LinkedIn
Copied!

Table of Contents

Search indexes

Version:

Only available versions of this content are shown in the dropdown

The Pega-RULES agent rebuilds indexes for Rules-, Data-, and Work- objects continuously. You can disable or enable indexing for these classes based on your system performance. For example, building and maintaining search indexes for work objects typically has a larger effect on performance than building and maintaining search indexes for rules or data instances.

How class instances are stored in the search index

When you are using a report definition to define a custom search gadget, it is helpful to understand how class instances are stored in the search index as explained in the following example.

Each search index type ( Work-, Data-, and Rule- ) stores a document for each class instance of each type. The document contains fields that represent the values of a subset of the properties in the instance.

Assume a sample class instance with only three properties:

.pyID = “WORK-1234”

.pyLabel = “Search enhancement”

.pyDescription = “Complex query”

  • All text property values, including all embedded properties, are tokenized, and the tokens (words) are stored in a field named Content in the search index for this instance. The Content field is the field used when simple search queries are entered that are designed to match any text value in an instance:
    • Content: WORK-1234
    • Content: search
    • Content: enhancement
    • Content: complex
    • Content: query
  • In addition, each top-level scalar property is also filterable. That is, its value is tokenized, and the tokens for that property are stored in a separate field that supports search queries specific to that property, like pyLabel contains enhancement:
    • Content: WORK-1234
    • Content: search
    • Content: enhancement
    • Content: complex
    • Content: query
    • pyID: WORK-1234
    • pyLabel: search
    • pyLabel: enhancement
    • pyDescription: complex
    • pyDescription: query

    The tokenized values of embedded properties can also be filter-enabled, if specified in a Data-CustomProperties-Search instance.

  • A subset of top-level scalar properties is also returnable. That is, the entire text value is also stored in the index, so that it can be returned in search results if desired:
    • Content: WORK-1234
    • Content: search
    • Content: enhancement
    • Content: complex
    • Content: query
    • pyID: WORK-1234
    • pyLabel: search
    • pyLabel: enhancement
    • pyDescription: complex
    • pyDescription: query
    • pyLabel = “Search enhancement”

    You can modify the list of returnable properties by specifying a Data-CustomProperties-Search instance. The default list of returnable properties for each index type is given below. It corresponds to the default list of exposed and indexed properties in these class types:

    • Returnable properties for all index types (Rule, Data, Work): pzInsKey, pxInsName, pxObjclass, pxCreateOperator, pxUpdateOperator, pxCreateDateTime, pxUpdateDateTime
    • Additional returnable properties for Work- classes: pyID, pyLabel, pyStatusWork, pyOrigUserID, pxUpdateOpName, pyResolvedTimestamp
    • Additional returnable properties for Data- classes: pyClassName
    • Additional returnable properties for Rule- classes: pyRuleSet, pyRuleSetVersion, pyRuleName, pyClassName, pyRuleAvailable, pxInstanceLockedBy
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.