You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Overview

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

It determines what data will be stored in the search index, and therefore used is search queries by end users. Any fields in the Product or ProductCategory table 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 fins plurals and other word stems like "ed", "ing", etc.

To set up an index field:
  • Go to the "Index fields" tab on the Lucene Settings Administration page
  • Add a new field
  • 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.
  • 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 in to 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
  • Enter the Source of the index field data. You can enter tokens for any fields in the Product or ProductCategory fields, and multiple fields can be included in a single index field
    • For Product fields, user the token [Product.Fieldname], (e.g. [Product.Description]
    • 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]
  • 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.
  • Select if the Field Value should be included in the 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.

 

  • No labels