Run Queries on the Product Index

You can enter a search phrase to run a query on the product index. This enables you to learn how each processor handles the phrase, the relevance score, and how it's derived. The search index execution plan viewer enables you to trigger the guided search parser with a phrase.

You can narrow your search to a specific category ID, a sorting rule, and to orderable products only.

  1. Select site > Merchant Tools > Search > Search Query Index Testing.
  2. On the Search Index Query Testing page, enter a search phrase, for example, flowered dresses.
  3. To search within the context of a specific category, enter a Category ID, for example, womens-clothing-dresses.
  4. To add refinement filters to the search results, enter a Filter, for example, 'refinementColor=Blue&size=M|XL'.
  5. To search within the context of a specific price range, enter a minimum and or maximum Price Range, for example 100–150.
  6. To search within the context of a specific promotion, enter a Promotion ID, for example, %offproductOptions.
  7. To search in the context of a promotion, select a Promotion Type, for example, “Bonus”.
  8. Select a sorting rule to search in the context of that rule, for example, best-matches.
  9. To see Einstein Search results, enter a Personalization Cookie, which is the cookie value taken from a storefront session that identifies the user for search personalization.
  10. Select Show Orderable Products Only to filter out products that are currently not orderable.
  11. Select Search Autocorrections to have misspelled or incomplete words modified by the suggestions processor.
  12. Click Find.
  13. Results display by time for each processor (ms) and with the entered phrase. For example, when the user enters flowered dresses, the results appear as flowered, dresses, flower, and dress, depending on the processor.

    The results are for the product index only.

    View the search results by each processor, as follows:

    • Phrase processor: splits the user input into phrases and detects negative terms.
    • Cleansing processor: removes invalid characters such as ! ( ) : [ ] { } + ~ ^ ? from the user input.
    • Product number processor: identifies and expands product numbers.
    • Commerce Cloud Einstein search recommendations processor: personalized search query correction using Einstein AI.
    • Suggestion processor: performs automatic correction (spell checking) and term completion; and identifies and corrects brand names.
    • Compound word processor: identifies and expands compound words based on configured compound word rules.
    • Common phrase processor: identifies known common phrases and marks them to be searched as phrase instead of individual terms.
    • Synonym/Hypernym processor: identifies and injects synonyms and hypernyms for the phrases.
    • Post processor: removes or escapes invalid or special characters.
    • Stopword processor: removes all defined stop words from the phrases.
    • Stemming exception processor: excludes defined terms from the default stemming and uses a custom stem.
    • Stemming processor: performs linguistic analysis and stemming of the query terms.
    • Query encoding: translates the phrases into a boolean expression.

    Results are also color-coded to provide more visibility into the changes made during search processing.

    • Phrases with a yellow background were modified by the processor.
    • Phrases with a red strike-through were removed by the processor.
    • Red phrases are negative phrases.
    • Products containing these words are excluded from the results.
    • Bold phrases are not stemmed by the stemming processor.
    • Green phrases are product numbers.
    • Phrases in quotes are not split into individual words.
    • Phrases in italics are synonyms.
    • A product is found if it matches either the original word or any synonym.
  14. View the Search Results by Relevance Score section.

    When searching on black skirt, for example, the results is as follows:

    • Total Hits: 14
    • Deepest Common Category: Storefront Catalog - EN
    • Did You Mean: black skirt (if Search Autocorrection is enabled)

    The first line of the results is as follows:

    • Score: 0.99
    • Product ID: 25696873
    • Product Name: Pencil Skirt
    • Brand: (empty)
    • Type: Variation Master
  15. Hover over the score information icon i for an individual product to see its relevance statistics, for example:

    0.076210484 = (MATCH) weight([email protected]:default:black in 406), product of:

    0.119570985 = queryWeight([email protected]:default:black), product of:

    2.5494642 = idf(docFreq=882, maxDocs=4158)

    0.046900436 = queryNorm

    0.63736606 = (MATCH) fieldWeight([email protected]:default:black in 406), product of:

    1.0 = tf(termFreq([email protected]:default:black)=1)

    2.5494642 = idf(docFreq=882, maxDocs=4158)

    0.25 = fieldNorm([email protected]:default, doc=406)

  16. Hover over the Details information icon i to see details on the product, for example:

    Categories

    • New Arrivals > Womens
    • Womens > Clothing > Bottoms

    Represented Products

    • 701644339012
    • 701644338961
    • 701644338978
    • 701644338992
    • 701644338985
    • 701644339005
    • 701644338954
  17. Click the view icon to see the product in the storefront.