Create a search index column to return warranty type suggestion data

Feature Pack 3Feature Pack 4In this lesson, you are adding a field to the search schema so that the data is searchable. By adding this field definition to the search schema file, the warranty data extensions can be extracted and stored in the search index.

About this task

In this lesson, the field you are adding is wartype_ntk_cs, the field is of type wc_keyword_text. This type of search index column is non-tokenized. A non-tokenized column stores the value in the search index, without processing it into partial tokens. Tokenized values for wartype can be L, LI, LIM, LIMI. The search engine supports many tokenizers to process data for different purposes. Non-tokenized values for wartype are LIMITED. The new column is used to display the field value for warranty type in the quick search auto-suggest menu.

Review the following topic to learn the background knowledge that is required to understand the lesson: Structured content.


  1. Navigate to the following directory:
    • WebSphere Commerce DeveloperWCDE_installdir/search/solr/home
    • SolarisLinuxWindowsAIXWC_installdir/instances/instance_name/search/solr/home

    This directory contains the master catalog folder, in which there are the configurations files for each language.

  2. Open the schema.xml file that is in the following directory:
    • WebSphere Commerce DeveloperWCDE_installdir/search/solr/home/MC_10001/en_US/Catalogentry/conf
    • SolarisLinuxWindowsAIXWC_installdir/instances/instance_name/search/solr/home/MC_10001/en_US/Catalogentry/conf
  3. Within the <fields> element, add the following new field to be indexed by search:
    <field name="wartype_ntk_cs" type="wc_keywordText" indexed="true" stored="true" multiValued="false" />

    Tip:Add the new field in the same location as the customized fields you added in the last tutorial. For example, in the following code the new field is added in the third field:

    <!--customization fields -->
    		<field name="warterm" type="wc_text" indexed="true" stored="true" multiValued="false" />
    		<field name="wartype" type="wc_text" indexed="true" stored="true" multiValued="false" />
    		<field name="wartype_ntk_cs" type="wc_keywordText" indexed="true" stored="true" multiValued="false" />
    		<field name="careinstruction" type="wc_text" indexed="true" stored="true" multiValued="false" />

    Take note of the following attributes for this new field:

    Use the value wc_keywordText
    Use the value true so that the original information is stored in the index. If you want to retrieve the field to display it, you must set this value to true; otherwise, the field can be searched but not displayed. It is not relevant whether the field is tokenized or non-tokenized.
  4. Within the <schema> element, add the following new field to be indexed by search:
    <copyField source="wartype" dest="wartype_ntk_cs"/>
  5. Save your changes and close the file.


The search index column is created. In the following lessons, you use to return the warranty type suggestion data for the auto-suggest menu.