Search Term Associations (STA) with Search types

Search term associations (STA) are used to suggest more, different, or replacement products in search results. Search term associations can also link search terms to a selected landing page in the store.

Query Composition Specification

Fundamental principles
  • Search type only applies to shopper provided keywords
  • Search scope (For example: Include Product, exclude SKU) does not affect STA expansion
  • STA expansion happens as soon as a match is found from the shopper's input, regardless of the search type
  • STA provided by Merchandiser always appends to the query as an optional inclusion
  • Merchandiser STA expansion always supersedes shopper's search type whenever there is a search term condition conflict.
  • All replacement term rules are processed first, followed by synonym expansions in the 2nd pass
  • Only a special case, called one to one replacement, will perform a synonym expansion against the resulting term(s).
  • MinimumMatch only applies to ANY search type queries
  • MinimumMatch parameter value should following these usage guidelines:
  • If configuration value set to 1 (which is default), then no minimum will get applied.
  • When the number of generated condition groups in the Elasticsearch query (for example, 2 groups) is less than the minimum match configuration (such as 5), then the configured minimum match will be overriden by the group count of the generated Elasticsearch query that is 2.
  • Special case of the above rule is when the number of generated groups is 1, then no minimum match will be applied.
  • More advanced minimum match configuration can also be used, such as 2<70% which has a meaning of only requires 70% of the given terms to be matched when the total terms provided is more than 2.
  • When advanced minimum match configuration is used, this same value can then be used with any number of generated query groups that is greater than 1.
  • Also do not modify the STA or Replacement added by the merchandiser, for instance, when a customer conducts a typical search for "coffee table," the phrase is split into two tokens and the search is conducted for "coffee or table" in any case. Search will be conducted on the complete phrase rather than individual tokens in the case of STA or Replacement terms as they cannot be divided up into distinct tokens. When searching for buffet table vs. coffee table, the results will alter if a substitute has been included, such as "buffet table => coffee table." When looking for a buffet table, the merchandiser must change the RHS of replacement from buffet table => coffee table to buffet table => coffee, table if we want to receive the same results.
Note: Applicable for Elasticsearch base solution when Core NLP is disabled.
Existing limitations and restrictions
  • No support for recursive expansion, meaning that when a term has been changed or enlarged, the resultant term(s) cannot be extended again.
  • Wildcard search will not work when exact search type is in use.
  • In case of multi term one to one replacement, after replacement get performed there will be no expansion on partial matching token from replaced term.

    For example: Replacement (pendant light => coffee table)

    Synonyms (table, globe)

    • When using the coffee table search term, the expanded search term will be "coffee" ("table" OR "globe").
    • While searching with pendant light, it will be replaced with coffee table and no further expansion will take place on table.
    • In scenarios like this, merchandisers must be more precise with replacements, such as (pendant light => table).
​Search Type Identifier Search term from Shopper: dress shoes Search term from Shopper: lawn mower accessories
​0 - ANY "dress" OR "shoes" ​"lawn" OR "mower" OR "accessories"
1 - EXACT "dress shoes" "lawn mower accessories"
2 - ALL "dress" AND "shoes" "lawn" AND "mower" AND "accessories"
3 - NONE ​-("dress" OR "shoes") ​​-(​"lawn" OR "mower" OR "accessories")
​Search Type Identifier With ​Single-term Synonyms (dress, skirt, gown)Search term from Shopper: dress shoes With Multi-term Synonyms​ (lawn mower, cutter)Search term from Shopper: lawn mower accessories
​0 - ANY ("dress" OR "skirt" OR "gown") OR "shoes" ("lawn mower" OR "cutter") OR "accessories"
1 - EXACT ("dress shoes "OR "skirt shoes "OR" gownshoes ") ("lawn mower​ accessories "OR" cutter accessories ")
2 - ALL ("dress" OR "skirt" OR "gown")AND "shoes" ("lawn mower" OR "cutter") AND "accessories"
3 - NONE ​-("dress" OR "shoes") AND ("dress" OR "skirt" OR "gown") ​​-(​"lawn" OR "mower" OR "accessories") AND ("lawn mower" OR "cutter")
Search Type Identifier With ​Single-term Replacement Term (dress-> skirt)Search term from Shopper: dress shoes With Multi-term Replacement Term​ (lawn mower -> cutter)Search term from Shopper: lawn mower accessories
​0 - ANY ("skirt") OR "shoes" ("cutter") OR "accessories"
1 - EXACT ("skirt" shoes") ("cutter​ accessories ")
2 - ALL ("skirt") AND "shoes" ("cutter") AND "accessories"
3 - NONE ​​-("dress" OR "shoes") AND ("skirt") -(​"lawn" OR "mower" OR "accessories") AND ("cutter")
​Search Type Identifier With ​Single-term Synonyms (skirt, gown)With ​Single-term Replacement Term (dress-> skirt)Search term from Shopper: dress shoes With Multi-term Synonyms​ (push mower, cutter)With Multi-term Replacement Term​ (lawn mower -> cutter)Search term from Shopper: lawn mower accessories
​0 - ANY ("skirt" OR "gown") OR "shoes" ("push mower" OR "cutter") OR "accessories"
1 - EXACT ("skirt shoes " OR "gown shoes ") ("push mower accessories"OR "cutter accessories")
2 - ALL ("skirt" OR "gown") AND "shoes" ("push mower" OR cutter")AND "accessories"
3 - NONE ​​-("dress" OR "shoes") AND ("skirt" OR "gown") -(​"lawn" OR "mower" OR "accessories") AND ("push mower" OR "cutter")

References

STA Type Search Term Association Type Description
​Synonym
  • ​Synonyms increase the scope of search results by adding additional search terms to search submissions. The search results include the submitted search term, plus the search results for the additional defined synonyms.
  • One or more synonyms can be defined for a search term.
  • Synonyms are bidirectional: searching for any of the search terms expands to also search for the other synonym search terms.
  • Single-term example: dress, skirt, gown
  • Multi-term example: lawn mower, cutter
​Replacement Terms
  • ​Replacement terms modify potential search results by changing search terms from search submissions. The search submission can include the defined changed search terms, while optionally discarding the submitted search term. The search results include only the search results for the replacement terms, helping target certain product types over others.
  • Replacement terms are unidirectional: the rule applies only when searching for the search term, but not when searching for any of the replacement terms.
  • Single-term example: dress -> skirt
  • Multi-term example: lawn mower -> cutter
Search Type Identifier Search Type Description
0 ANY (INCLUDE products, kits, bundles, EXCLUDE product level SKUs, product variants, and category level SKUs)
1 EXACT (INCLUDE products, kits, bundles, EXCLUDE product level SKUs, product variants, and category level SKUs)​
2 ​ALL (INCLUDE products, kits, bundles, EXCLUDE product level SKUs, product variants, and category level SKUs)
3 NONE (INCLUDE products, kits, bundles, EXCLUDE product level SKUs, product variants, and category level SKUs)​
10 ANY (INCLUDE products, product variants, kits, bundles, product level SKUs, category level SKUs)
11 EXACT (INCLUDE products, product variants, kits, bundles, product level SKUs, category level SKUs)
12 ALL (INCLUDE products, kits, product variants, bundles, product level SKUs, category level SKUs)
13 NONE (INCLUDE products, product variants, kits, bundles, product level SKUs, category level SKUs)
100 ANY (INCLUDE product level SKUs, category level SKUs, EXCLUDE products, product variants, kits, bundles)​
101 ​EXACT (INCLUDE product level SKUs, category level SKUs, EXCLUDE products, product variants, kits, bundles)
102 ALL (INCLUDE product level SKUs, category level SKUs, EXCLUDE products, product variants, kits, bundles)​
103 NONE (INCLUDE product level SKUs, category level SKUs, EXCLUDE products, product variants, kits, bundles)
1000 ANY (INCLUDE products, kits, bundles, category level SKUs, EXCLUDE product level SKUs, product variants)
1001 EXACT (INCLUDE products, kits, bundles, category level SKUs, EXCLUDE product level SKUs, product variants)
1002 ​ALL (INCLUDE products, kits, bundles, category level SKUs, EXCLUDE product level SKUs, product variants)
1003 NONE (INCLUDE products, kits, bundles, category level SKUs, EXCLUDE product level SKUs, product variants)
10000 ANY (INCLUDE category level SKUs, EXCLUDE products, kits, bundles, product level SKUs, product variants)
10001 EXACT (INCLUDE category level SKUs, EXCLUDE products, kits, bundles, product level SKUs, product variants)​
10002 ALL (INCLUDE category level SKUs, EXCLUDE products, kits, bundles, product level SKUs, product variants)
10003 NONE (INCLUDE category level SKUs, EXCLUDE products, kits, bundles, product level SKUs, product variants)​
20000 ​ANY (INCLUDE variants, kits, bundles, category level SKUs EXCLUDE products, product level SKUs)
20001 EXACT (INCLUDE variants, kits, bundles, category level SKUs EXCLUDE products, product level SKUs)​
20002 ​ALL (INCLUDE variants, kits, bundles, category level SKUs EXCLUDE products, product level SKUs)
20003 NONE (INCLUDE variants, kits, bundles, category level SKUs EXCLUDE products, product level SKUs)​
20010 ANY (INCLUDE products, variants, kits, bundles, category level SKUs EXCLUDE product level SKUs)​
20011 EXACT (INCLUDE products, variants, kits, bundles, category level SKUs EXCLUDE product level SKUs)
20012 ALL (INCLUDE products, variants, kits, bundles, category level SKUs EXCLUDE product level SKUs)
20013 NONE (INCLUDE products, variants, kits, bundles, category level SKUs EXCLUDE product level SKUs)

When Basic NLP is used, you must add the locale name and snowball stemmer-supported language name in the stemmer.language property if it is not in the supported stemmer list. The snowball stemmer was added for the below set of locale to the index settings. For this stemmer, we do not need to do any additional configuration.

[ar_EG = Arabic, it_IT = Italian, pt_BR = Portuguese, Romanian = ro_RO, ru_RU = Russian, fi_FI = Finnish, sv_SE = Swedish]

In addition to the stemmer list, if there is a need to add a snowball stemmer for a new language, it can be achieved through the configuration endpoint. To get this added, execute the request to the configuration endpoint using the PATCH request method. After this change, you must restart the NiFi and trigger the full index. Once the index gets completed new stemmer will get added to the index settings.

Sample request:
PATCH - http://<dataQueryHost>:<dataQueryPort>/search/resources/api/v2/configuration?nodeName=ingest&envType=auth
{
"global": {
"connector": [
{
"name": "attribute",
"property": [
{
"name": "stemmer.language",
"value": "

{\"nb_NO\": \"Norwegian\", \"nl_NL\": \"Dutch\"}

"
}
]
}
]
}
}
Note: If locale is not supported by the current store then no stemmer will be added to the index settings. For more information to find the supported snowball stemmer, see Snowball token filter.