Updating spelling dictionaries for the data domain

Use the updateSpellingDictionaries operation of the Data Ingest Web Service to update the spelling dictionaries in the data domain. Run this operation after you have added data records to the data domain, to enable spelling correction in the Dgraph.

This operation rebuilds the spelling dictionaries for spelling correction from the data corpus while the Endeca Server continues to run. The Endeca Server can continue processing end-user queries and updates to the data domain's index, without stopping and restarting the Dgraph nodes.

Run this operation after you have added data records to the data domain, to enable spelling correction in the Dgraph processes for this data domain.

Additionally, during the data ingest process, you can run the request with the updateSpellingDictionaries operation periodically to update the spelling dictionary the data domain for one of the Endeca Server features known as Automatic Spelling Correction and DYM (Did You Mean?).

In a cluster of Dgraph nodes ( a data domain running on multiple hosting Endeca Server machines), this request is routed to the leader node, because it is an updating operation.

The request performs the following actions:
  • Crawls the text search portion of the index for the data domain for all terms that meet the constraint settings.

    The constraint settings include minimum word occurrences and maximum and minimum number of characters, for records and attribute values. The Dgraph nodes in the data domain use these constraints to update the spelling dictionaries. You can change them in the Global Configuration Record.

  • Updates the spelling dictionaries stored in the Dgraph for processing of all queries arriving after this update to the index files. The Dgraph uses these updated dictionaries when processing all future queries. For detailed information on spelling dictionaries, see the Oracle Endeca Server Developer's Guide.
The Dgraph process applies the updated settings while continuing to run queries and without needing to restart.

To update the spelling dictionaries for the data domain:

  1. Access the Data Ingest Web Service for the data domain:
    http://localhost:<port>/endeca-server/ws/ingest/<dataDomain>?wsdl

    where the localhost and port are the host and port of the running Oracle Endeca Server, endeca-server is the default context root for the Endeca Server Java application running in the WebLogic Server, and dataDomain is the name of the Endeca data domain.

  2. Use the updateSpellingDictionaries operation in the request, as in this example:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
      xmlns:ingest="http://www.endeca.com/MDEX/ingest/3/0">
     <soapenv:Header/>
         <soapenv:Body>
            <ingest:updateSpellingDictionaries>
               <ingest:OuterTransactionId>txId</ingest:OuterTransactionId>
            </ingest:updateSpellingDictionaries>
          </soapenv:Body>
    </soapenv:Envelope>

    where txId is the ID of an outer transaction (if one is running).

    Note: If you submit this request after a Transaction Web Service request that starts an outer transaction, the request must specify the outer transaction ID element. If no transactions have been started, the ID element must be omitted or its value should be empty.

If the data domain exists and is enabled, the operation completes successfully, returning an empty web service success response (updateSpellingDictionariesResponse). This means that the spelling dictionaries have been updated successfully.