Configuring stop words

This topic describes how to create a graph that loads stop words.

Stop words are words that are removed from a query before it is processed by the Dgraph.

The default stop_words document does not define any stop words:
<STOP_WORDS/>

Use an XML-based configuration graph to configure stop words. See XML-based configuration graphs.

Input file

The following example illustrates a typical example stop words input document:
<STOP_WORDS>
  <STOP_WORD>bike</STOP_WORD>
  <STOP_WORD>component</STOP_WORD>
  <STOP_WORD>an</STOP_WORD>
  <STOP_WORD>of</STOP_WORD>
  <STOP_WORD>the</STOP_WORD>
</STOP_WORDS>

Web services request

Use the putConfigDocuments operation of the Configuration Web Service to load the stop words 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="stop_words">
<STOP_WORDS>
  $xmlString
</STOP_WORDS>
</mdex:configDocument>
</config-service:putConfigDocuments>
</config-service:configTransaction>
The value of the name attribute (stop_words) of the configDocument element directs the service to update the stop_words document in the server with the value of the $xmlString variable in the STOP_WORDS node.