WebSphere Commerce Search index schema

The WebSphere Commerce Search index process involves a search index schema, and is built from temporary tables.

Indexing WebSphere Commerce content with WebSphere Commerce Search requires a well-structured index schema design, so that populating and querying the index is efficient when searches are submitted.

The WebSphere Commerce Search schema-related information is stored in the schema.xml file, with other configuration information stored in the solrconfig.xml file. We can customize these files directly. The unique key of the index is the catentry_id field. That is, the index document is only for CATENTRY. If other WebSphere Commerce objects must be indexed, for example, CATGROUP, separate index document must be created. The default query operator is set to OR.

The following default field types are available, providing advanced index functions:


Search dictionary files

Synonyms, stop words, and stemming are controlled in the following ways:


Highlighting search keywords

Highlighting keywords is a default query component. The query controls how the highlighting works. The field must be stored in the index for highlighting to be enabled. The field option stored must be set to true in the schema.xml file.


Spelling correction

The indexed content is used to create the term dictionary, so that the generated dictionary data is relevant to the indexed data. Spell checking is enabled in the search request handler in the wc_spellcheck component in the solrconfig.xml file. The wc_textSpell field type and spellCheck field is created in the schema.xml file. The spellCheck field contains the field's name, shortDescription, and keyWord by default.

The following sample query searches for coffee with spellcheck enabled:


Spell checker component

A more efficient spell checker, DirectSolrSpellChecker, is used instead of the spell check index. This spell checker component uses data directly from the CatalogEntry index, instead of relying on a separate stand-alone index. Therefore, no additional index builds are required to synchronize changes between the base index and the spell checker index. See SpellCheckComponent.


Automatic keyword suggestions

The TermsComponent is implemented in WebSphere Commerce for auto-suggest functions. The component provides fast field faceting over the entire index. That is, it is not restricted by the base query or any filters. The document frequencies returned are the number of documents that match the term, including any documents marked for deletion but not yet removed from the index.

Retrieving terms from the index order is relatively fast since the implementation directly uses the Lucene TermEnum functions to iterate over the term dictionary.

The wc_termsComponent search component and wc_terms request handler are created in the solrconfig.xml file. The auto-suggest query points to the wc_terms request handler to get the auto-suggest terms. For example:


Default search scope

The following columns are searched on by default, that is, instead of searching on the entire search index, if no index field is given:

However, the WebSphere Commerce Search runtime always passes in a search scope and is defined as part of the search profile. See WebSphere Commerce Search configuration file (wc-search.xml).


Schema changes for related structured and unstructured content

When structured content contains a relationship with unstructured content, it must contain a new field in the structured schema.xml file to represent the unstructured information. This new field can query the structured objects by their unstructured content. For example, when you search for products by the attachments' content information, the following new field definition resembles the following form:

Where the stored="false" snippet enables unstructured content to not be retrieved by queries.


See

  1. WebSphere Commerce Search index schema definition

  2. Temporary table schema definition

  3. Logical representation of indexed columns

  4. WebSphere Commerce Search extension indexes


Related concepts
Workspaces in WebSphere Commerce Search