Looking for the old docs site? You can still view it for a limited time here.

Use Predictive Merchandiser Search Rewrites

  1. Enter a search term or phrase in the search bar.

  2. Hover your cursor next to the query. A + button will appear: Add query rewrite

  3. Click the + button. A list of search rewrites options will appear: Head/Tail, Misspelling, Phrase, and Synonym.

Head/Tail

You can create a Head/Tail rewrite to improve search results using methods other than correcting for misspellings or synonym expansion. When a poorly defined search term is identified, the original term is replaced by an improved search term.

For example, a search for iphone case yellow could be improved by using the search term iphone case yellow +color:"yellow" (in this case making use of the color field in the data).

Most Head/Tail rewrites will typically be created automatically via machine learning. However, if desired, custom rewrites can be manually created using the following steps.

  1. From the list of search rewrite options, select Head/Tail. A form will appear:

    Create head/tail search rewrite

    This form contains the following fields:

    Parameter Description Example Value

    Tail Query

    The tail query itself.

    iphone case yellow

    Improved Query

    The query that will replace the tail query phrase.

    iphone case yellow +color:"yellow"

    Tags

    Optional metadata tags that can be used to identify and organize rewrites.

    blackfridaysale

  2. Enter one or more improved search terms in the Improved Query field.

  3. Click the Save button: Save search rewrite

The search is re-run using the improved search term, and a Search box information panel drops down to show that the new search rewrite has fired:

Head/tail rewrite results

Misspelling

You can create a misspelling search rewrite to detect and correct common spelling mistakes. When a customer enters a search term containing a known misspelling, the incorrect spelling is replaced with the spelling correction.

For example, if your customers frequently misspell or mistype the word sweater as sweatre, you can set up a search rewrite to automatically correct it.

  1. From the list of search rewrite options, select Misspelling. A form will appear:

    Create misspelling search rewrite

    This form contains the following fields:

    Parameter Description Example Value

    Misspelled Term

    The phrase itself.

    sweatre

    Corrected Term

    The term that will replace the mispelled term.

    sweater

    Action

    Action to perform.

    Confidence

    Confidence score from the phrase job. A confidence level of 1 represents 100% confidence. For rules created automatically via machine learning, the confidence level will reflect the output from the machine learning model.

    1

    Tags

    Optional metadata tags that can be used to identify and organize rewrites.

    blackfridaysale

  2. Enter one or more spelling corrections in the Corrected Term field.

  3. Click the Save button: Save search rewrite

The search is re-run using the corrected spelling, and a Search box information panel drops down to show that the new search rewrite has fired:

Misspelling rewrite results

Phrase

You can use search rewriting to identify phrases used in search terms so that products with matching phrases are boosted in the search results. This is helpful when users don’t use quotation marks to identify phrases in their search terms.

For example, without phrase detection a search for the words remote control would show results for both remote and control. With phrase detection, this search would correctly boost results for "remote control".

  1. From the list of search rewrite options, select Phrase. A form will appear:

    Create phrase search rewrite

    This form contains the following fields:

    Parameter Description Example Value

    Surface Form

    The phrase itself.

    remote control

    Word Count

    Indicates how many words are included in the phrase.

    2

    Confidence

    Confidence score from the phrase job. A confidence level of 1 represents 100% confidence. For rules created automatically via machine learning, the confidence level will reflect the output from the machine learning model.

    1

    Tags

    Optional metadata tags that can be used to identify and organize rewrites.

    blackfridaysale

    Phrase Count

    Denotes how many times this phrase was found in the source. This value is automatically set via machine learning. It does not need to be set manually.

    5

    Boost Factor

    The factor to use to boost this phrase in matching queries.

    2.0

    Slop Factor

    Phrase slop, or the distance between the terms of the query while still considering it a phrase match.

    10

  2. Enter the number of words in the phrase in the Word Count field.

  3. Click the Save button: Save search rewrite

The search is re-run, with your search words identified as a phrase, and a Search box information panel drops down to show that the new search rewrite has fired:

Phrase rewrite results

Synonym

You can specify synonyms for a specified search term so that alternative words with the same meaning are automatically used in the search query. When a customer enters a search term with a synonym match, the alternative words are used instead of, or in addition to, the original search term.

For example, the search term sweater could have the synonyms pullover and jumper.

  1. From the list of search rewrite options, select Synonym. A form will appear:

    Create synonym search rewrite

    This form contains the following fields:

    Parameter Description Example Value

    Surface Form

    The term that has synonyms.

    sweater

    Direction

    With a oneway search, the original search term is replaced by the synonym. In the example above, sweater would be replaced by the alternative words pullover and jumper.

    With a symmetric search, the search query is expanded to include the original term and the synonyms, resulting in a greater number of potential hits. In the example above, this time the query would include sweater, pullover, and jumper.

    symmetric

    Synonym Mappings

    Synonyms for the surface form.

    pullover, jumper

    Confidence

    Confidence score from the phrase job. A confidence level of 1 represents 100% confidence. For rules created automatically via machine learning, the confidence level will reflect the output from the machine learning model.

    1

    Tags

    Optional metadata tags that can be used to identify and organize rewrites.

    blackfridaysale

    Count

    How many times this term occurred in the signal data when it was discovered. This value is optional when a rewrite is being defined manually.

    5

  2. Choose whether the direction is oneway or symmetric.

  3. Enter one or more alternative words in the Synonym Mappings field.

  4. Click the Save button: Save search rewrite

The search is re-run using the synonyms, and a Search box information panel drops down to show that the new search rewrite has fired:

Synonym rewrite results