Modifying the list of stop words

You can change the default list of stop words used by the Oracle Text feature. A stop word is a word that does not get indexed. When querying an Oracle Text index for a stop word, Oracle Text won’t return data for the query.

By default, the CreateOpenPagesTextIndex.bat|.sh script creates a stop word list called OP_STOPLIST. (See Create a long string index for an Oracle database.) The stop word list is empty at the time of index creation.

You can use the CustomIndexing_ManageStopWords.sql script to add stop words to OP_STOPLIST.

Procedure

  1. Open CustomIndexing_ManageStopWords.sql with a text editor
  2. Add a stop word for each word you would like to add by copying the following, commented out sections:
    /*
        ADD_STOPWORD_TO_ARRAY
        (
        p_name               => 'me'
        ); 
        */ 

    For example, if you want to add the stop word the, copy the preceding section, remove the comment sign, and replace me with the as follows. Repeat the same step for each word you want to add.

    ADD_STOPWORD_TO_ARRAY
        (
        p_name               => 'the'
        ); 

    Stop words that you add to this file take effect the next time that you re-index. This file is used as the most updated list of stop words when the index is re-created. When running CustomIndexing_Step2_IndexCreate.sql, all current stop words in OP_STOPLIST are removed. It is a good idea to keep this file up to date.