Jump to: navigation, search

Search

Purpose

A generic interface used for searching UCS indexing service. The Indexing service is configurable to parse and index content of SRLs, Contacts or Interactions. In this document, those three different types of UCS objects will be called 'Documents'.

UCS should use event-based indexing (modified properties in documents will be re-indexed). This interface only reflects the interface used for querying UCS Documents: it does not describe configuration of the indexing service.

URL

  • GET /Index/Search/

Request

Parameters

Key ValueType Value Description Mandatory Unique Default
IndexName String any Identifies the object that needs to be queried in UCS indexing service.

No guaranteed values, names are customizable. Possible values by default in template:

  • srl
  • contact
  • interaction
true true
MaxResults Integer Max number of returned Documents. false true UCS default
TenantId Integer Mandatory if subtenant/subscriber-id-enabled is true false true
Query String Defines the query to be processed*.

See Lucene site for more information about Lucene queries: http://lucene.apache.org/

true true Can be set in configuration
DefaultFields String String such as "FirstName, LastName" Default fields to be searched for. This is an optional parameter. It enables default querying.These queries are identical:
  • Query = "john", DefaultFields = "EmailAddress, FirstName"
  • Query = "EmailAddress:john OR FirstName:john", no DefaultFields.
false true None
SubscriberId String **Important**: Added in 8.5.0 The subscriber (i.e. line of business) within the tenant to which the contact belongs false true
  • Query parameter: the way of indexing can change what data is indexed and whether it is indexed, thus changing the potential results. Refer to UCS indexing configuration for options to be set during indexing process.

Sample

IndexName contact
MaxResults 2
Query EmailAddress:hotmail

Success

Other types of Query parameter to set in Search request: ? Contact:
? "kristina" (DefaultFields="FirstName, LastName" optional parameter needs to be set), this is the same query as "FirstName: kristina+LastName:kristina"
? "FirstName: john AND LastName: castro
? SRL:
? "Body: madam
? "MyCustomAttribute: reference" (some config need to be done to configure analyzer for this field)
? Interaction:
? "StructuredText: contract"
Note: GetIndexProperties provides the key field names that are searchable.

Parameters

Key ValueType Value Description Mandatory Unique Default
FoundDocuments Integer Total Count of Documents matching. true true
ReturnedDocuments Integer Number of Documents returned true true
Documents KVList List of returned documents ordered. false true


DocumentData KVList

Key ValueType Value Description Mandatory Unique Default
(Document Index) KVList (Document Index) is a string representation of an integer index used to maintain Documents ordering, priority false true


KVList

Key ValueType Value Description Mandatory Unique Default
(Field Name) String The list of fields. false false


Sample

FoundDocuments 10
ReturnedDocuments 2
Documents 0 DocumentType Contact
BoostFactor 1.0
Id UCSIDXXXXXXXXXXX
EmailAddress mrs.brown@hotmail.com
...
1 DocumentType Contact
BoostFactor 1.0
Id UCSIDXXXXXXXXXXX
EmailAddress mr.brown@hotmail.com
...
...

Error/Event3rdSeverFault

FaultCode FaultString Description
950 Indexing is disabled (change configuration options). Applies only for a given index.
951 Index searching is disabled (change configuration options). Applies only for a given index.
952 Incorrect IndexName specified: '{0}'. Index is not available or not configured.
953 Unable to parse query: '{0}'.
954 Unable to search in index: '{0}'.
955 Unable to find document '{0}' in index: '{1}'.

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on May 18, 2018, at 07:04.