Skip to main content
Skip table of contents

Extending global search

The JSON configuration is specified as es.syncConfig="${es.syncConfig}" in the environment file. You can include the value of es.syncConfig in the properties file.

Before the JSON configuration can be included in the properties file, it must be compressed, and some special characters must be escaped. This can be done using a text editor with appropriate plugins. The following changes are required:

  • Remove all spaces and line breaks. The definition must be all on one line.

  • Use the backslash (\) character to escape all colon (:) characters.

  • Change all quote (“) characters to their HTML code "

The default global search configuration includes only activities and entities. The default configuration is shown below.

JSON
{
    "Entity": {
        "attributes": ["lastName^5", "firstName^4", "classCode"],
        "auditAttributes": ["createTime", "editTime"],
        "caption": "ui.search.subj.Entity",
        "dateAttributes": ["birthTime"],
        "dateAttributesTZ": {
            "UTC": ["birthTime"]
        },
        "fullTextAttributes": ["notes"],
        "icon": "icon:\uE7FD",
        "navEvent": "sysNavigate",
        "navPaths": ["Contacts", "refPersonBio"],
        "ordinal": 1,
        "resultSummary": ["firstName", "lastName"],
        "syncAttributes": ["deleted"],
        "syncPageSize": 100,
        "typePrivilege": {
            "HOU": "mda:HouseholdsEnabled"
        }
    },
    "Act": {
        "attributes": ["title^3", "classCode"],
        "auditAttributes": ["createTime", "editTime"],
        "caption": "ui.search.subj.Act",
        "dateAttributes": ["endTime", "startTime"],
        "fullTextAttributes": ["text", "textNotesNoHTML"],
        "icon": "icon:\uE8DF",
        "ordinal": 2,
        "relationalAttributes": ["entityParticipants entity", "userParticipants entity"],
        "resultSummary": ["title"],
        "syncAttributes": ["deleted"],
        "syncPageSize": 100
    },
    "$rolloverConfig": {
        "min_size": "30gb",
        "tenant_name": "acme"
    },
    "$viewConfig": {
        "datePattern": "date.m.f",
        "enabled": true,
        "maxLen": 400
    }
}

To include another subject area in the search, you must edit the JSON configuration to add the appropriate class with associated attributes.

Global search properties for adding or managing search subject areas

For each class you want to add the search, add an object by specifying the class name and then define how the search should be done for that class.

{ClassName1:

{properties}

}

If the class is a derived from a base class, the base class must also be included in the definition and the base class attribute sets are inherited by the derived class.

Each attribute can only be included in one attribute category. An attribute cannot be included in more than one of the following:

  • attributes

  • auditAttributes

  • dateAttributes or dateAttributesTZ

  • fullTextAttributes

  • relationalAttributes

Properties

Description

Example

"attributes": ["{attribute1}^{WEIGHT1}","{attributeN}^{WEIGHTN}","{attributeB1}",...,"{attributeBN}"]

Attributes to be included when searching for a record.

The attribute weight affects the order of the results displayed. A higher weight means record with a match in that field will be displayed above a record with matches in other fields.

For example, a record with a match on last name will be displayed above a record with a match on first name. Attribute weight is optional.

"attributes": ["lastName^5", "firstName^4", "classCode"]

"auditAttributes": ["{attribute1}",...,"{attributeN}"]

Attributes to be included when searching for system audited fields.

"auditAttributes": ["createTime", "editTime"]

"caption": "{STRINGID}"

"caption": "ui.search.subj.Entity",

"dateAttributes": ["{attribute1}",...,"{attributeN}"]

Attributes to be included when searching for user-entered date fields, in the local time zone.

"dateAttributes": ["birthTime"]

"dateAttributesTZ": {
"ZONE_NAME_1": ["{attribute1}",...,"{attributeN}"]],
...
"ZONE_NAME_N": ["{attributeN1}",...,"{attributeNN}"]]
}

Attributes to be included when searching for user-entered date fields, in the specified non-local time zone.

If the attributes are defined in dateAttributes and not in dateAttributesTZ, then the local time zone is assumed.

"dateAttributesTZ": {
"UTC": ["birthTime"]}

"fullTextAttributes": ["{attribute1}",...,"{attributeN}"]

Attributes that are not included in the search, but that will be used for text preview in search results.

If value is specified in fullTextAttributes, it should not be specified in attributes.

"fullTextAttributes": ["notes"]

icon

Icon that will be used for this subject area in the filter button above the search results.

"icon": "icon:\uE7FD"

navEvent

Include this property to add a button to each search result and specify the name of the event that the button should fire.

"navEvent": "sysNavigate"

"navPaths": ["{WORKSPACE}", "{PORTLET}", ...]

If adding a button to navigate to a detailed view from the search results, specify the workspace and portlet for the view.

"navPaths": ["Contacts", "refPersonBio"]

ordinal

The order in which the subject area filter buttons are displayed on the Search page.

If this value is not specified, the result from this class will not be displayed in the results list, but will only affect the syncing and querying behavior of the global search functionality.

"ordinal": 1

"relationalAttributes": ["{attribute1}",...,"{attributeN}"],


Collection attributes to be included when searching for related objects. Each attribute can be a space-separated path.

"relationalAttributes": ["entityParticipants entity", "userParticipants entity"]

"resultSummary": ["{attribute1}",...,"{attributeN}"]

Main caption for result tile. Values are appended in the specified order, with space separators.

"resultSummary": ["firstName", "lastName"]

"syncAttributes": ["{attribute1}",...,"{attributeN}"]

Additional attributes to read to prevent lazy loads during the sync process.

"syncAttributes": ["deleted"]

syncPageSize

Number of instances that will be read by the nightly or manual sync job for each page. Recommended minimum value is 100.

"syncPageSize": 100

"typePrivilege": {"SUBCLASS_CLASS_CODE}": "{PRIVILEGE_NAME}"}

Class subtypes that should be included in the search for users with appropriate privileges.

"typePrivilege": {"HOU": "mda:HouseholdsEnabled"}

Rollover configuration and view configuration apply to all supported classes. You can change the configuration using the following properties.

Global search rollover configuration properties

Define the following properties within the $rolloverConfig object.

Property

Description

Example

bulk_action_count_threshold

The number of bulk actions in the ready queue to flush a bulk request at. Set to 0 to disable.

"bulk_action_count_threshold": 1000

bulk_size_bytes_threshold

The size (in bytes) of the ready queue of bulk actions to flush a bulk request at. Set to 0 to disable.

"bulk_size_bytes_threshold": 5242880

flush_interval

The interval (in milliseconds) to flush any bulk actions in the ready queue. Set to 0 to disable.

"flush_interval": 5000

min_doc_count

The minimum number of documents required to roll over the index.

"min_doc_count": 10000000

min_index_age

The minimum age required to roll over the index. Index age is the time between its creation and the present.

"min_index_age": "365d"

min_size

The minimum size of the total primary shard storage (not counting replicas) required to roll over the index.

"min_size": "30gb"

ready_queue_threshold_factor

The factor to apply to the action count and size thresholds to determine if a bulk request can be added to the ready queue. Must be greater than or equal to 1.

"ready_queue_threshold_factor": 5

tenant_name

Tenant name.

OpenSearch indices have the following naming restrictions:

All letters must be lowercase.
Index names can’t contain spaces, commas, underscores (_), hyphens (-), or the following characters:

:, ", *, +, /, \, |, ?, #, >, or <

The tenant name can also be set in the environment file using the es.tenant_name property. The tenant name specified in the environment file overrides the one specified in the JSON definition.

"tenant_name": "acme"

Global search view configuration properties

Define the following properties within the $viewConfig object.

Property

Description

Example

datePattern

Date pattern used when parsing and displaying dates in query input.

"datePattern": "date.m.f"

enabled

Set to false to hide the global search functionality from all users, for example for a temporary maintenance shutdown.

The value must be set to true to enable the global search feature for your deployment. However, other settings (such as the appropriate user privileges) may override this value.

"enabled": true

maxLen

Maximum length in characters for the query input.

"maxLen": 400

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.