Searching the UCS Database
Starting with release 8.0, UCS supports full-text search of contacts, interactions, and standard responses using the Platform SDK (PSDK) Contact API.
To enable full text search, the stored data must be prepared, an operation known as indexing. Indexing converts, abbreviates, and sorts data to allow fast searching in large data sets.
There are various ways of preparing the data for the index; one way is to divide text data into words. Another way of preparing text data is stemming, or storing only the stem of a word rather than all its forms (for example, run, running, runs, and ran all stored as simply run). UCS uses analyzers to perform word division and stemming; you can configure which analyzer applies to which database field. In addition,
- Examples of the syntax used for searching are available.
- Many attributes are not directly searchable because of how they are stored; however you can make such attributes searchable.
More About Indexing
It is important to note that the UCS indexing service enables searching for text data, but does not guarantee its retrieval.
When an object is found it must be retrieved using standard PSDK methods. These methods are documented in the API References of the Platform SDK.
When designing an application, data coming from search results should be considered as cached data, like the preview that can be seen in web search engines. This data is optimized for search and cannot be used to update UCS database objects. For example, the StructuredText of an interaction is rendered from HTML to text. All formatting is lost if this data is re-inserted into the interaction.
Documents stored in the index will at least have the following retrievable fields:
id—Unique identifier in the UCS database. This is what enables retrieval of the object from UCS.
IndexationDate—The date this index was created. The format is UTC (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').
DocumentType—Type of the document, selected from the following:
Interaction (Open Media)
- id = 00001a4EM4TD007K
- IndexationDate = 2013-10-02T13:54:54.318Z
- Type = chat
In the index, even dates and numbers are text. This format enables alphabetic sorting, so that, for example, 21 December 2008 comes before 1 June 2009.
Default configuration enables the indexing of Contacts, Interactions and Standard Responses.