Skip Navigation
Expand
Excluding specific words or phrases from searching
Answer ID 1309   |   Last Review Date 03/12/2024

How do I exclude specific words or phrases from being included in a search?

Environment:

Word List files, Incident and Answer Phrase searching

Resolution:

The files listed below affect which words are excluded from keyword searching and which words are included in similar phrase searching. Words excluded from searches are often referred to as stopwords.

You can add and remove Stopwords from the list by going to Configuration > Service > Knowledge Base > Answer Stopwords / Incident Stopwords

The exclude_incidents.txt file contains common words such as prepositions that are excluded from natural language searches with incidents in Oracle B2C Service. This affects searching for incidents at the Support Console and on the Account - Support History page.
 
The   exclude_answers.txt file contains the common words that are excluded from searching on the end-user Answers pages and at the Answer Console.
 
The  thesaurus.txt file includes groups of synonyms used when using the Similar Phrases searching option. By editing this file, you can define specific groups of synonyms to use.

 

In addition, the smartsense.txt file allows you to add emotive words to be used with the SmartSense emotive indexing feature. You can add unrated words to this list to expand the emotive indexing function for your specific application. Changes to this file affect new and updated incidents and new chat sessions. Existing incidents are not affected by changes to this file.

Multiple interfaces:  Within the File Manager, files located in the wordlist menu are not interface specific. Each file is language specific.  That is, if two interfaces in your site have the same language pack applied, those interfaces share the same wordlist files.  For example, if two interfaces both have the en_US language pack applied, if you add words to the answers_exclude.txt file for one interface, those words are also excluded from searching in the other interface that uses the en_US language.


To Update a Word List File:

These files are accessible using the File Manager. To access and update these files use the steps below:

  1. From the Configuration items, select System Configuration > File Manager. 
     
  2. Select Wordlist Files from the Switch to drop-down menu. Please note, there are three options to choose from:

    wordlist files 
    wordlist - backup
    wordlist - default

    Only "wordlist files" can be edited. The other two files are not directly editable and do not have the option to save.
     
  3. Click the appropriate file name to open the file. 
     
  4. Edit the file accordingly:
     
    Entries must be entered in all capital letters.

    If editing the exclude_answers.txt, exclude_incidents.txt, nlp_exclude.txt, or nlp_faqexclude.txt files, additional words to be excluded are entered with one word per line (carriage-return delineated).

    If editing the smartsense.txt file, type the word followed by at least one space and enter the rating value between -10 and 10. Then press Enter so that each word and associated rating is on a separate line. The rating is used for internal calculations related to this feature. 10 is a highly positive word and -10 is extremely negative.

    If editing the synlist.txt file, each group of synonyms is entered together on one line with each word separated by commas. For more information on editing this file, refer to Adding synonyms to be used when searching for answers.
     
  5. Click Save.

    When editing these files, the wltool utility must be run. If you edit these files using the File Manager, the wltool utility is run automatically when you save any of these three files.
     
  6. If you have edited any of the exclude files and wish for these changes to affect all existing incidents and/or answers, you must rebuild the appropriate phrases table. Run the keyindexer utility to rebuild the phrases table. Refer to the section below.


Rebuilding the Phrases Table

If you have only added words to one of the exclude files, you do not need to rebuild your phrases table. However, if you add several words to a file, consider rebuilding the phrases table anyway so that the overall size of the table can be reduced. Reducing the size of the phrases table can improve the speed of searches performed on your site.

If you have removed words from one or more of the exclude files, you must rebuild the phrases table. To do this, please submit an Ask Technical Support request to our Technical Support staff. In the assistance request, include the name of your site and which file you edited.

The phrases table for answers is separate from the phrases table for your incidents. To rebuild the phrases tables for your answers or incidents, the keywordindexer utility must be run for your site in order for the words in the incidents and/or answers to be reindexed according to the new contents of the file. If you do not rebuild the index, changes to the text file (namely, the removal of words from the file) will apply ONLY to incidents and answers that are created or edited after the file was modified.

 

Note: When keywordindexer is run against your site, you may or may not take your site off-line.

The process of reindexing your incidents and/or answers may take several hours depending on the number of incidents and answers in your knowledge base.