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 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.
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:
|
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.
<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.