Documentation Center

Creating a Stop-Words List

You can exclude certain topics, or directories of topics, from being indexed by Content Delivery. To be more granular, however, you can also exclude English words from being indexed, too.

About this task

Content Delivery comes with a default stop-words list. To customize the behavior of this list to suit your needs, follow these steps.

Procedure

  1. Copy ContentDelivery_home\db\LiveContent\ui\skins\base\xsl\ui\search_build_xconf.xsl to your custom skin, and then open the custom skin version in a text editor.
  2. Add values to the <analyzer> element: Replace <analyzer id="en" class="org.apache.lucene.analysis.standard.StandardAnalyzer"/> with, for example,
    <analyzer id="en" class="org.apache.lucene.analysis.standard.StandardAnalyzer">
    		<param name="stopwords" type="org.apache.lucene.analysis.util.CharArraySet">
    			<value>the</value>
    			<value>this</value>
    			<value>and</value>
    			<value>that</value>
    		</param>
    	</analyzer>
    Set as <value> any stop-word you would like to be used by the system.
  3. At a command prompt, run loaddb (by default loaddb uses the UPGRADE command).
  4. Restart Tomcat or the Knowledge Center XML database service.
  5. Reindex the database.