Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

It determines what data will be stored in the search index, and therefore 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 used, allowing searchers to find plurals and other word stems like "ed", "ing", etc.

...

  1. Login to the CMS. 
  2. Navigate to Advanced SettingsLucene Search Settings.
  3. Select the 'Index Fields' tab.
  4. Add a new field
  5. 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.
  6. 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 Standard analyser simply breaks the search field data into words, without applying any stemming.
    • It is recommended to use the Snowball analyser for index fields that contain descriptive text, and the standard analyser for other fields
  7. 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]
  8. 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.
  9. 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.
  10. 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 - you would not want this behaviour ; 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".

...