B2C Commerce search indexes use data from these indexes: Product, Spelling, Content, Synonym, Suggest, Availability, and Active data.
Product Index
A product appears in search results only if it's searchable, online, and assigned to at least one online category. If a product is assigned to both online and offline categories, it’s still indexed. Only product attributes that are configured as searchable attributes are indexed.
- a non-null value
- the value of its variation group
- the value of base product
For example, if the
base product.refinementColor=red and
variation.refinementColor=blue, the product is found for search
by red and blue.
Index terms derive from product data through the following processing steps:
- Synonyms: synonyms configured so that any term returns the search results for all
terms. For example, if
pantsandtrousersare synonyms, then searching onpantsreturnspantsandtrousersand searching ontrousersreturnspantsandtrousers. Synonyms are added for words with German umlauts, that is, ‘küche’, ‘kueche’ - Hypernyms: a hypernym returns all the results from a series of hyponyms, though the
hyponyms only return their own results. For example, if
winterwearis a hypernym forhats,gloves, andmittens, then searching onwinterwearreturnshats,gloves, andmittens, but searching onhatsreturnshats,glovesreturnsgloves, andmittensonly returnsmittens. - Stop words: words that the search engine ignores. For example: "an" or "the". This creates a more compact index and faster return of search results. Stop words are removed based on stop word dictionary
- Compound words: the merchant specifies phrases that are searched as phrases and as a single word. For example, if a customer enters cheese cake, if this is a compound word, then results for "cheese AND cake" and "cheesecake" are returned. Compound words are split into their parts based on the compound words dictionary
- Common phrases: the merchant specifies words found together to count as a search hit, or words that count as a search hit if either the full phrase or just the last word in the phrase is found.
- Word Stems: All words in searchable product attributes are stemmed based on the stemmer configured for each index type. Word stemming lets customers find products based on the basic part of the word.
- Special characters:
! ( ) : [ ] { } + ~ ^ ? 'are removed - Product numbers: Product numbers are split into their parts.
Spelling Index
If a customer searches on a term and no results are found, spelling suggestions analyze the search term to see if there it's a misspelling and then presents similar terms found in the product set. For example, if a customer searches on "telewision" they’re asked if they meant "television".
The spelling index is compiled using an algorithm and doesn't require manual configuration. However, enable the feature on the Search Preferences page in Business Manager. The spelling index uses the product and content indexes and requires rebuilding after them.
Content Index
The content index is built based on content assets, library folders, and libraries. Content assets appear in search results only if they're searchable and online. Content attributes that are configured as searchable are indexed. The content index uses the same processing rules as the product index to derive index terms.
Synonym Index
The synonym index is built based on synonyms/synonym groups defined for a specific language. All synonyms are stemmed based on the configured stemmer.
Suggest Index
The suggest index is built based on category names, brand names, and terms added or excluded on the Search Suggestions page in Business Manager.
All suggestions are converted to appear in lower case, even if their original values include uppercase letters. Suggestions only appear if there is at least one result associated with the suggestion.
To determine search result counts, a search is executed for each suggestion during building, using the current product index. Build the product index before building the suggest index to get accurate counts.
Availability Index
Inventory data is included in the availability index even if no product exists for the inventory record. This decouples availability updates and data replication so that they aren’t dependent on each other. Update the availability index for a new product and when the new product is replicated from Staging to Production, it immediately appears in search results because the related availability data is already included in the availability index on Production.
The following specific rules apply:
- Availability index processes inventory records for all existing site (and multi-site for inventory list) products.
- Availability index processes inventory records if no product exists for it and if the inventory record was created or modified within the last 5 days.
- Availability index skips inventory records if no product exists for it and if the inventory records weren’t created or modified within the last 5 days. This is to prevent the processing of inventory records that are considered outdated and obsolete.
- If the new product is a base product or product set, or is a variation product or part of a product set, search result sorting can be incorrect if the applied sorting rule uses any aggregated availability attributes, such as SKUCoverage or TTOOS (Time to Out of Stock). This is because the search index can't aggregate data for complex products if it doesn’t have any information about the product. When the product data has been replicated, the availability index has been rebuilt, and the page cache has been refreshed, the sorting is correct.
The availability index is built based on information about product availability that is used to sort and filter search results by inventory status. This index relies on a transaction that updates inventory amounts and therefore requires regular rebuilding. B2C Commerce sites that are assigned to the same inventory list share the search availability index. Only one index is maintained per inventory list.
The search availability index is updated automatically and incrementally when the following events occur:
- Import updates inventory records
- Inventory records are updated in Business Manager
- Shoppers place orders in the storefront
The availability index isn't replicated from the staging system to the production system. Instead, it's created and updated on the production system.
Active Data Index
Use the active data index to include active data attributes collected from the storefront, imported from backend systems, or calculated in B2C Commerce, when presenting sorting options to customers or for sorting rules for category or keyword searches.
The active data index contains information about product active data such as sales velocity. The daily active data feed automatically causes this index to rebuild one time a day. Rebuild the index manually only after a custom feeds import.