Skip Navigation
Expand
Excluding parts of an answer from being indexed
Answer ID 1985   |   Last Review Date 12/17/2018

How can I exclude specific content from an answer from being indexed? 

Environment:

Answers

Resolution:

For any answer, you can exclude specific content from being indexed. This allows you to prevent certain words or phrases from being indexed, or searched on, for that answer. As a result, the answer is not returned when a search is performed on content that is excluded from indexing. 

This approach allows you to more directly impact which answers are returned for specific searches.  By excluding specific answers from being returned for specific search terms and phrases, your site visitors can more easily find answers for a specific search term.


Stopindex and Startindex Tags

To exclude specific words or sections of answer content from being indexed, you can use special HTML tags designed specifically for use with answers.

When  <!--stopindex-->  and <!--startindex-->  tags surround content in an answer, that content is excluded from being indexed. These tags can be added to the following fields in an answer:

  • Keywords
  • Question
  • Answer

The <!--stopindex--> and <!--startindex--> tags must be manually added to the appropriate field.  When adding these tags to the Question or Answer field, add the field in Source mode. Click the Source tab to add the tags within the source code.

You can add multiple sets of these tags within a single answer if you determine that there are separate words or blocks of content to exclude from indexing.


Examples:  Within the Answer field, in Source mode, you could add tags as follows to exclude content:

Within this sentence, there are <!--stopindex--> specific words <!--startindex--> to exclude from searching.

In this case, "specific" and "words" are not indexed when the answer is saved.  Other words in the sentence are eligible for being indexed.  Note that if "specific" and "words" is included in another field, another sentence or in a file attachment, they may be indexed due to the additional occurrence within the answer.


You can also exclude an entire paragraph or paragraphs from being indexed:

<!--stopindex--> This entire paragraph is excluded from being indexed. The paragraph could be several sentences long. <!--startindex-->


Global Exclusion of Search Terms

You can exclude specific words from being indexed in any answer by adding them to the exclude_answers.txt  file.  This file contains common words such as prepositions, adverbs, and pronouns that are excluded from indexing and searching functions on the customer portal. If you have specific words that you do not want customers to be able to search on, you can add these stopwords to the exclude_answers.txt file to exclude them from being indesed. Stopwords must be uppercase and typed on separate lines. Note: Words in this file are also excluded when using SmartAssistant to search for an answer.

For more information on excluding words globally, refer to Answer ID 1309: Excluding specific words or phrases from searching.