Searchable Attribute Input

Searchable attribute.
JSON example
1{
2  "nameOrId": "Name",
3  "type": "Standard",
4  "isSearchable": true,
5  "weight": 8
6}
Properties
Name Type Description Required or Optional Available Version
isSearchable Boolean Specifies whether the attribute is searchable (true) or not (false). Default value is true. Optional 49.0
nameOrId String Developer name of the attribute. In version 49.0 and later, the ID of the attribute isn’t supported. Required 49.0
type String Type of attribute. Values are:
  • Custom
  • ProductAttribute
  • ProductCategory
  • Standard
Required 49.0
weight Integer Specifies the relative contribution of each searchable field to the relevance ranking of search results. Valid values: 1 (lowest)–10 (highest). Default to 1 if not specified or if set to null.

Usage:

  • The weight property controls how much each searchable field contributes to search result relevance ranking.
  • Fields with a higher weight cause matches on those fields to rank higher in search results. For example, setting the Name field to weight 8 and Description to weight 3 means products matching by name rank above products matching only by description.
  • A re-index is required after changing weights for the new rankings to take effect in search results.
Optional 67.0