Introduced in Feature Pack 2

Reviewing the search schema

Introduced in Feature Pack 2 In this lesson, the search schema is reviewed before continuing on with customizing WebSphere Commerce search. In this tutorial, the customer ranking field is used to index user ratings input as XML data from an external data source.

About this task

Procedure

  1. Navigate to the following directory:
    • WebSphere Commerce DeveloperWCDE_installdir/search/solr/home/MC_10001/en_US/Catalogentry/conf
    • SolarisLinuxAIXWindowsWC_installdir/instances/instance_name/search/solr/home/MC_10001/en_US/Catalogentry/conf

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

  2. Open the schema.xml file.
  3. Note the following default defined field elements. These elements are included in the schema.xml file for customization purposes.
    <field name="customerRanking" type="tfloat" indexed="true" stored="false" multiValued="false" />
    <field name="customerRanking_display" type="float" indexed="true" stored="true" multiValued="false" />
    
    
    Note: The following default defined copyField element in the schema.xml file:<copyField source="customerRanking" dest="customerRanking_display"/>
    Where:
    customerRanking
    This field is of type tfloat which performs better when using arithmetical operations. This field is used for comparisons when searching. For example, customerRanking > 5.
    customerRanking_display
    This field has a type of float. The performance of casting float to string is better, so this field is returned in the search results and is used to display items on the storefront.

    When stored is set to true, the original information is stored in the index. making whether the field is tokenized or non-tokenized not relevant. If you want to retrieve the field to display it, you must set stored to true, otherwise, you can only search on the field. See Structured content for more information.

    In the following lesson, you will use the customerRanking index field to store the ranking data retrieved from the external XML file.

Results