Commerce Management Webstore Search, Include Rules

Create or retrieve search include rules for a webstore. You can create up to 50 rules for a webstore. Search include rules are not configurable in the UI.
Resource
Resource example
Available version
58.0
HTTP methods
GET, PUT, POST
POST is supported in version 66.0 and later.
Response body for GET
Include Search Rules Collection
Request body for POST
Root XML tag
<searchResultsRule>
JSON example
Properties
Name Type Description Required or Optional Available Version
locales String Comma-separated list of locales that the include search rule applies to. Required 58.0
ruleDefinition String Comma-separated list of terms that the include search rule applies to. Valid number of unique strings is from 2 through 5. Required 58.0
type String Type of search rule. Value is:
  • BidirectionalSynonym—Use when terms are interchangeable and must return the same results both ways. For example, jacket ⇄ winter coat. Available from API version 66.0 and later.
  • Include—Use when a term in a query matches any term in a ruleDefinition, Commerce Search returns results for all terms in the list. Supported in API versions 58.0 to 66.0.

    We suggest using BidirectionalSynonym, which returns equivalent results for interchangeable terms in both directions, unlike Include.

    Note

  • UnidirectionalSynonym—Use when one term must expand results, but not necessarily the reverse. For example, jacket → hoodie. Available from API version 66.0 and later.
Required 58.0
Response body for POST
Search Results Rule Output
Request body for PUT
Root XML tag
<searchResultsRules>
JSON example
Properties
Name Type Description Required or Optional Available Version
searchResultsRules Include Search Rule Input[] A collection of include search rule inputs. Required 58.0
Response body for PUT
Include Search Rules Collection