Facet Field Retrieval

Facet fields are retrieved from Elasticsearch before product results. The retrieval process:

  1. Facet Configuration: If a Facet Configuration exists for an attribute, it determines the facet's aggregation settings, field mappings, and extraction strategy

  2. Size Limits:

    • If attribute key is "category_ids", size is set to 500

    • Otherwise, default size is 100

    • Custom sizes can be configured via Facet Configuration

  3. Inventory Strategy Context: Facet fields are returned with inventory strategy context, as prices and availability may vary by inventory strategy

  4. Widget Creation: After retrieval, facet data is converted to widgets:

    • Attribute IDs from Elasticsearch are used to fetch attribute values from the database

    • Widget types are determined by attribute configuration

    • Widgets include choices with quantities, labels, and selection states

Last updated

Was this helpful?