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.

ValueSearchConfig is a type of ContentElementConfig complex type element. ValueSearchConfig controls the behavior of a single value search query.

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
HandlerFunction Required attribute. Specifies the ValueSearchHandler handler function for ValueSearchConfig.
HandlerNamespace Required attribute. Specifies the namespace for the handler function.
Id Optional. An identifier for this query configuration.
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.
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.
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.
Language Optional. Specifies a language ID for the search. Valid language IDs are listed in the topic Supported languages.

Example of a value search query

The following example illustrates the format of a typical value search request in the Conversation Web Service:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Request xmlns="http://www.endeca.com/MDEX/conversation/2/0">
      <State />
      <Operator xsi:type="RecordKindOperator" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <RecordKind>data</RecordKind>
      </Operator>
      <ContentElementConfig xsi:type="ValueSearchConfig" 
         Id="ValueSearch" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         HandlerNamespace="http://www.endeca.com/MDEX/conversation/2/0"
         HandlerFunction="ValueSearchHandler"
         MaxPerProperty="5"
         RelevanceRankingStrategy="static (nbins,descending)"
         Mode="Any"
         Language="en">
         <SearchTerm>envoy</SearchTerm>
         <RestrictToProperties>
            <Property>PROD_NAME</Property>
         </RestrictToProperties>
      </ContentElementConfig>
    </Request>
  </soap:Body>
</soap:Envelope>

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