Overview

Setting up index fields is a required step when implementing Lucene Search.

It determines what data will be stored in the search index, which is used in search queries by end users. Any field in the Product or ProductCategory tables can be included in the indexed data for a product.

Index field maintenance also allows configuration of how the data is indexed - for example whether or not word stemming should be allowed so searchers can find plurals and other word stems like "ed", "ing", etc.

Step-by-step guide:

To set up a Lucene index field: 

  1. In the CMS, navigate to Advanced SettingsLucene Search Settings.

  2. Select the 'Index Fields' tab.

  3. Add a new field.

  4. Enter the Field Name. This is the name of the field in the index, and does not need to be related to any of the product or category field. The field name can be used by searchers to limit searching to a specific field, for example "description:book" would show products that have the word "book" in the "description" index field.

  5. Select the Analyser to be used. 'Standard' and 'Snowball' are supported.
    • The Snowball analyser will apply stemming algorithms to the indexed data, allowing for plurals and other word stems to be searched.
    • The Standard analyser simply breaks the search field data into words, without applying any stemming.
    • For index fields that contain descriptive text, Showball recommended. For other fields, the standard analyser should be used.

  6. Enter the Source of the index field data. You can enter tokens for any fields in the Product or ProductCategory tables, and multiple fields can be included in a single index field.
    • For Product fields, user the token [Product.Fieldname], (e.g. [Product.Description] or [Product.ProductCode]).
    • For ProductCategory fields, user the token [ProductCategory.Fieldname], (e.g. [ProductCategory.Notes1]
    • To include more than one field, use the + symbol, (e.g. [Product.Description][Product.Notes1][ProductCategory.Notes5]

  7. Enter a field Boost Value. Entering a value of greater than 1 will make the data in the field considered more relevant in search results. A value less than 1 makes the data less relevant.

  8. Determine whether the Field Value should be Included in Spell Checker. This determines which data is used for Lucene's spell checking database. Generally, you would include descriptive fields in the spell check database, but you would not include fields that contain data such as product codes, as these will pollute the spell checking suggestion.

  9. Determine whether to Allow Contains Search for this field. Enabling this prompts Lucene to index the field several times, dropping off the first character each time. This enables a "contains" rather than a "starts with" search.
    Note - this option is applicable to Product Code or Model Number type searches; not desirable for description or text searches. 
    • Example: with Allow Contains Search enabled, a product code of "AV12345" would be indexed as "AV12345", "V12345", "12345", "2345", "345", "45", and "5".


Related help