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.
{
"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. |
|
"auditAttributes": ["{attribute1}",...,"{attributeN}"] | Attributes to be included when searching for system audited fields. |
|
"caption": "{STRINGID}" |
| |
"dateAttributes": ["{attribute1}",...,"{attributeN}"] | Attributes to be included when searching for user-entered date fields, in the local time zone. |
|
"dateAttributesTZ": { | Attributes to be included when searching for user-entered date fields, in the specified non-local time zone. If the attributes are defined in |
|
"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 |
|
icon | Icon that will be used for this subject area in the filter button above the search results. |
|
navEvent | Include this property to add a button to each search result and specify the name of the event that the button should fire. |
|
"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. |
|
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. |
|
"relationalAttributes": ["{attribute1}",...,"{attributeN}"], | Collection attributes to be included when searching for related objects. Each attribute can be a space-separated path. |
|
"resultSummary": ["{attribute1}",...,"{attributeN}"] | Main caption for result tile. Values are appended in the specified order, with space separators. |
|
"syncAttributes": ["{attribute1}",...,"{attributeN}"] | Additional attributes to read to prevent lazy loads during the sync process. |
|
syncPageSize | Number of instances that will be read by the nightly or manual sync job for each page. Recommended minimum value is 100. |
|
"typePrivilege": {"SUBCLASS_CLASS_CODE}": "{PRIVILEGE_NAME}"} | Class subtypes that should be included in the search for users with appropriate privileges. |
|
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_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. |
|
flush_interval | The interval (in milliseconds) to flush any bulk actions in the ready queue. Set to 0 to disable. |
|
min_doc_count | The minimum number of documents required to roll over the index. |
|
min_index_age | The minimum age required to roll over the index. Index age is the time between its creation and the present. |
|
min_size | The minimum size of the total primary shard storage (not counting replicas) required to roll over the index. |
|
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. |
|
tenant_name | Tenant name. OpenSearch indices have the following naming restrictions: All letters must be lowercase. :, ", *, +, /, \, |, ?, #, >, or < The tenant name can also be set in the environment file using the |
|
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. |
|
enabled | Set to The value must be set to |
|
maxLen | Maximum length in characters for the query input. |
|