Examples: Search term association expansion

Several factors determine how a shopper's search query is expanded into a Solr query. The expanded query depends on: the search term association type (synonyms, also-search-for, and instead-search-for); the value of the minimum match parameter; the value of the minimum match option parameter, and whether any search term associations within the shopper's query contain single or multiple words.

The following examples illustrate combining minimum match with search term associations, in all cases the minimum match value is 2:

Example: Using synonyms

The following sample uses these terms as synonyms: azure, navy blue.
Product data Shopper's query MinMatchOption Search result Explanation
  • azure shirt
  • navy blue shirt
  • azure dress
  • men backpack
  • azure shirt for girls
men navy blue shirt 1
  • azure shirt
  • navy blue shirt
  • azure shirt for girls
The result order depends on which fields in the products are indexed.
Minimum match is applied to the expanded query.

For reference, the following code snippet shows the expanded Solr query: q= men navy blue ("navy blue" azure) shirt&mm=2.

2
  1. navy blue shirt
  2. azure shirt
  3. azure dress
  4. azure shirt for girls
Products that meet the minimum match criteria (on shopper's search terms, and all search term associations that apply to single search terms in the query) display first. Then, products that contain any of the terms that are mentioned in the second subquery display next.

For reference, the following code snippet shows the expanded Solr query: q=(_query_:"{!edismax mm='2'} men navy blue shirt")^2 OR (_query_:"{!edismax } (\“navy blue\” azure)”)

3
  1. navy blue shirt
  2. azure shirt
  3. azure shirt for girls
  4. men backpack
  5. azure dress
Products that meet the minimum match criteria (on shopper's search terms, and all search term associations that apply to single search terms in the query) display first. Then, products that contain any of the terms that are mentioned in the second subquery are displayed.

For reference, the following code snippet shows the expanded Solr query: q=(_query_:"{!edismax mm='2'} men navy blue shirt")^2 OR (_query_:"{!edismax } men navy blue shirt (\"navy blue\" azure )")

4
  1. navy blue shirt
  2. azure shirt
  3. azure shirt for girls
Products that meet the minimum match criteria on the shopper's search terms are returned first, followed by products that satisfy the minimum match condition on the shopper's search terms and corresponding search term associations.

For reference, the following code snippet shows the expanded Solr query: q=(_query_:"{!edismax mm='2'} men navy blue shirt")^2 OR (_query_:"{!edismax mm='2' } men navy blue (\“navy blue\” azure) shirt”)

Example: Using synonyms and replacement terms (instead-search-for)

The following sample uses these terms as synonyms: boy, young men; and these terms as replacements: navy blue is replaced by azure.
Product data Shopper's query MinMatchOption Search result Explanation
  • azure shirt
  • navy blue shirt
  • boy shirt
  • azure shirt for girls
young men navy blue shirt 1
  • azure shirt
  • boy shirt
  • azure shirt for girls
Minimum match is applied to the query.

For reference, the following code snippet shows the expanded Solr query: q=young men shirt ("young men" boy )azure&mm=2

2
  • azure shirt
  • boy shirt
  • azure shirt for girls
Products that match any of the query terms are displayed next.
Minimum match is ignored.

For reference, the following code snippet shows the expanded Solr query: q=young men ("young men" boy) azure shirt

3
  • azure shirt
  • azure shirt for girls
  • boy shirt
Products that match any of the query terms are displayed next.
Products that match the transformed query are boosted.

For reference, the following code snippet shows the expanded Solr query: q=(_query_:"{!edismax mm='2'} young men shirt azure")^2 OR (_query_:"{!edismax } young men shirt (\"young men\" boy ) azure")

4
  • azure shirt
  • boy shirt
  • azure shirt for girls
Minimum match is applied to the query.

For reference, the following code snippet shows the expanded Solr query: q=young men shirt ("young men" boy )azure&mm=2