Searchabilities

Searchabilities control how different metadata fields associated with items or variations are used. Searchabilities are crucial for optimizing the product discovery experience, allowing for a more precise, efficient, and user-friendly results by controlling how data is indexed, retrieved, and displayed. The configurable properties of searchability for a single metadata field are:

  • Displayable: whether a metadata field should be included in the index and returned as a property of each item by default in API responses. Used to optimize payload size.
  • Hidden: whether a metadata field should be included in the index but not returned as a property of each item by default in API responses. Hidden fields can be made visible through specific request parameters.
  • Fuzzy searchable: whether a metadata field should be matched in a "fuzzy" manner against search queries, meaning it can match even if there's not an exact match. Used for accommodating misspellings or variations in search terms.
  • Exact searchable identifier: whether a metadata field should match exactly with the search query. Used for ID-like fields like SKUs where an exact match is necessary.

Searchability configurations are refreshed during ingestion of product updates. Searchability configurations for fields which no longer exist in the catalog will be maintained in the event a field was removed from the feed momentarily by mistake.

When configuring searchabilities, it is possible to specify nested fields using a dot notation to indicate the path through the object hierarchy. Constructor supports ingestion of nested searchabilities - they can be defined in the metadata fields of each product:

{
  "facet": {
    "color": "red"
  }
}

In the preceding example, facet.color would be a generated searchable configuration.

API endpoints

Creating new searchabilities

When new searchability configurations are defined based on a field being added to the catalog, they are inactive by default. Their exact_searchable and fuzzy_searchable fields will be set to false.

When retrieved using the Retrieve searchabilities endpoint, date of creation for the searchability configuration (when the field was first added to the catalog or the searchability configuration was created manually) will be reflected in the created_at field. The updated_at field will reflect the date when searchability configuration was last modified.

When new searchability configurations are created or updated, they will only take effect when the associated index is updated.