Skip to content

Algolia Index Integration

The Algolia Index Integration feature is responsible for keeping the Algolia search index in sync with the product catalog stored in the Zwerfkei Backend database. It powers product search and faceted filtering on the Zwerfkei Website.


Purpose

Core functions

  • Index products and variants from the Backend database into Algolia after catalog syncs.
  • Update Algolia records when product data changes (price, stock, attributes, availability).
  • Remove records from Algolia when products are deactivated or deleted.
  • Expose product attributes as facets for filtered browsing on category and search pages.

Involved Services

Service Responsibility
Ergonode PIM Source of truth for product data (attributes, categories, descriptions, images).
Zwerfkei Backend Syncs data from Ergonode, enriches with pricing and stock from Navision, and pushes records to Algolia.
Algolia Stores and serves indexed product records; handles search queries and facet aggregation.
Zwerfkei Website Queries Algolia directly via Vue InstantSearch for search results and filtered category pages.

Process Flow

Concept — needs verification

The process flows below are conceptual. They have not yet been validated against the actual implementation. Review and confirm with the development team before treating these as authoritative.

Indexing flow

sequenceDiagram
    participant Ergonode as Ergonode PIM
    participant Backend as Zwerfkei Backend
    participant Navision as Microsoft Dynamics
    participant DB as Backend Database
    participant Algolia as Algolia

    Ergonode->>Backend: Product data via API (sync job)
    Backend->>DB: Store products, variants, attributes
    Backend->>Navision: Fetch pricing & stock per variant
    Navision-->>Backend: Price and availability data
    Backend->>Algolia: Push enriched product records (Algolia API)
    Algolia-->>Backend: Index acknowledgement

Search & filter flow

sequenceDiagram
    actor Visitor
    participant Website as Zwerfkei Website
    participant Algolia as Algolia

    Visitor->>Website: Opens category page or search
    Website->>Algolia: Search query + active filters (Vue InstantSearch)
    Algolia-->>Website: Ranked results + facet counts
    Website-->>Visitor: Render product grid and filter panel
    Visitor->>Website: Applies a filter (e.g. brand = Osprey)
    Website->>Algolia: Updated query with refinements
    Algolia-->>Website: Filtered results + updated facet counts
    Website-->>Visitor: Updated product grid

Index Record Structure

Each Algolia record represents a product variant — the smallest orderable unit. Records are enriched with product-level data for search and filtering.

Field Source Purpose
objectID Backend Unique Algolia record identifier (variant SKU)
product_id Backend DB Reference to the parent product
sku Ergonode Variant SKU
name Ergonode Product title (searchable)
description Ergonode Product description (searchable)
brand Ergonode Brand name (facet + searchable)
categories Ergonode Hierarchical category path (facet)
attributes Ergonode All attribute values (material, colour, size, etc.) — facets
price Navision Current selling price (numeric facet / sort)
price_original Navision Original price before discount
in_stock Navision Boolean availability flag (facet)
stock_quantity Navision Available stock count
images Ergonode Primary product image URL
url Backend Canonical product page URL
weight Ergonode Product weight in grams (numeric facet)

Facets

Facets are Algolia attributes configured as filterable in the Algolia index settings. They power the filter panels on category and search pages via Vue InstantSearch.

Facet Type Widget
brand String <ais-refinement-list>
categories Hierarchical <ais-hierarchical-menu>
attributes.material String (multi) <ais-refinement-list>
attributes.colour String (multi) <ais-refinement-list>
attributes.gender String <ais-refinement-list>
attributes.size String <ais-refinement-list>
price Numeric range <ais-range-input>
weight Numeric range <ais-range-input>
in_stock Boolean <ais-toggle-refinement>

Index Replicas

Algolia replicas are separate indices used for alternative sort orders. The main index is sorted by relevance; replicas handle other sort options.

Replica Sort order
zwerfkei_products Relevance (default)
zwerfkei_products_price_asc Price: low to high
zwerfkei_products_price_desc Price: high to low
zwerfkei_products_weight_asc Weight: light to heavy
zwerfkei_products_newest Date added: newest first

Connection to other features

  • Cart Process — Products discovered via Algolia search are added to the cart.

Algolia Tool Documentation

  • Algolia


    InstantSearch.js, Vue InstantSearch components, index configuration and links to official documentation.

    Algolia Tool