Value search query format

To make a value search query, use a ValueSearchConfig type, specifying a SearchTerm element and, optionally, the attributes within which you would like to search.

A ValueSearchConfig type controls the behavior of a single value search query. The syntax for this type is:
<ValueSearchConfig Id="?" MaxPerProperty="?" RelevanceRankingStrategy="?" Mode="?" Language="?">
   <StateName>?</StateName>
   <SearchTerm>?</SearchTerm>
   <RestrictToProperties>
      <Property>?</Property>
   </RestrictToProperties>
</ValueSearchConfig>

The SearchTerm element specifies search term(s) used by the Oracle Endeca Server for a search either against all value-searchable attributes, or those that you specify in RestrictToProperties. You can optionally limit the number of search matches returned for each attribute using MaxPerProperty.

The ValueSearchConfig type has the following parameters (some of which are optional):
Parameter Description
Id Optional. An identifier for this query configuration.
MaxPerProperty Optional. Limits the number of matches returned per record attribute. If this attribute is omitted, all found matches for the record attribute are returned.
RelevanceRankingStrategy Optional. Specifies a relevance ranking strategy to use on the results. If you omit this attribute and do not specify a relevance ranking strategy, the value for the strategy provided in the DIMSEARCH_CONFIG configuration document is used. If the document does not specify a strategy, the results are ranked using the following three strategies in this order (to break ties): interp, exact, and static.
Mode Optional. Specifies a search mode, such as Any, or AllPartial. If Mode is not used, the query defaults to using the All search mode.
Language Optional. Specifies a language ID for the search. Valid language IDs are listed in the topic Supported languages.
RestrictToProperties Optional. If not specified, the request searches within all attributes. If specified, the request searches within specified attributes.
SearchTerm Required. Contains the search term(s) (also known as keywords) used to conduct value search. The maximum number of characters in each search term is set by the --search-char-limit configuration flag (in the Endeca command put-dd-profile), which defaults to 132 characters.
StateName Specifies an existing named state in the request, using these rules:
  • If the request has multiple named states, then the StateName element must reference one (and only one) of the named states.
  • If the request has only one named state, then it is optional as to whether the StateName element is used to reference that named state (as the state will be used in any event in the RecordListConfig).
  • If the request has an unnamed state, then the StateName element cannot be used.

Specifying a collection for value search

You can run a value search query against the records in a specific collection. To do so, specify the collection name in the <CollectionName> element of the State type, and then reference the name of the State in the StateName element of the ValueSearchConfig type.

response

The results of a value search query are returned in a Results complex type, which includes the ValueSearch type. In the ValueSearch response, the following information is returned:
  • The PropertyMatches element appears only for those standard and managed record attributes in which matches were found, and contains values for those matches.
  • TotalValuesCount specifies the number of values returned for each value-searchable attribute.
  • HasMore specifies whether there exist more attribute matches, beyond those that are returned. Because the request may limit the number of result values, the list of results returned may contain returned values and also indicate that a additional matching values exist that are not returned.

Example of a value search query

The following example illustrates the format of a typical value search request in the Conversation Web Service:
<Request>
   <State>
     <Name>MyProductSearch</Name>
     <CollectionName>Products</CollectionName>
   </State>
   <ValueSearchConfig Id="ProdSearch" MaxPerProperty="5" 
        RelevanceRankingStrategy="static (nbins,descending)" Mode="Any" Language="en">
      <StateName>MyProductSearch</StateName>
      <SearchTerm>aluminum</SearchTerm>
   </ValueSearchConfig>
</Request>

In this request, a search is conducted for the term envoy within the records of the Products collection. The number of requested results to return per attribute is set to 5 and English (en) is the language for the search.

In the example, the name of the State is MyProductSearch and it specifies the Products collection. In turn, the ValueSearchConfig type uses the StateName element to associate the MyProductSearch state to the config.