Configuring value search

This topic describes how to create a graph that loads the configuration for value search.

Value search is configured by the dimsearch_config XML document. The default document includes an empty configuration:
<DIMSEARCH_CONFIG/>
Use the RELRANK_STRATEGY attribute of the DIMSEARCH_CONFIG element to specify a relevance ranking strategy to use on the results.
Note: Only specify a relevance ranking strategy in value search configuration if have already configured that relevance ranking strategy. See Configuring relevance ranking. If you specify a relevance ranking strategy that does not exist, the graph will fail with the message "Invalid Relevance ranking strategy".

For additional details about configuring value searches, see the Oracle Endeca Server Developer's Guide.

Use an XML-based configuration graph to configure relevance ranking. See XML-based configuration graphs. Note that since the input document consists of a single node, you do not need to include a Denormalizer to reformat the input file as a single XML string.

Input file

To configure value search, you need to create an input file similar to this example:
<DIMSEARCH_CONFIG FILTER_FOR_ANCESTORS="FALSE" RELRANK_STRATEGY="ProductRelRank"/>

In this case, the ProductRelRank relevance ranking strategy must be defined before submitting this configuration or the configuration will fail.

Web services request

Use the putConfigDocuments operation of the Configuration Web Service to load the value search configuration document. The code entered in the Web Services Client resembles the following example:
<config-service:configTransaction 
  xmlns:config-service="http://www.endeca.com/MDEX/config/services/types/1/0">
<config-service:OuterTransactionId>${OUTER_TRANSACTION_ID}</config-service:OuterTransactionId>
<config-service:putConfigDocuments  
  xmlns:mdex="http://www.endeca.com/MDEX/XQuery/2009/09">
<mdex:configDocument name="dimsearch_config">
<DIMSEARCH_CONFIG>
  $xmlString
</DIMSEARCH_CONFIG>
</mdex:configDocument>
</config-service:putConfigDocuments>
</config-service:configTransaction>
The value of the name attribute (dimsearch_config) of the configDocument element directs the service to update the dismsearch_config document in the server with the value of the $xmlString variable in the DIMSEARCH_CONFIG node.