LogoLogo
CommunitySupport PortalYouTubeStart a free trial
  • Welcome
  • Commerce Engine
  • Orchestration Engine
  • API Documentation
  • Release Notes
  • Changelog
  • Commerce Engine
  • Getting Started
    • General Concepts of Emporix
    • Creating your first tenant
    • Developer Portal
      • Manage Users
      • Manage API Keys
      • Tenant List
      • My Account
      • Manage Showcase and Sample Data
  • Customer Use Cases
    • Commerce Use Cases
      • Quote Process
      • Orders
      • Coupons and Redeeming Rewards
      • Returns
      • Payments
      • User Management and Approvals
      • Customer Social Login
      • Personalized Commerce - Customer Segments
      • Company Shared Orders and Customer Groups
    • Automated Use Cases
      • First Registration Coupon
      • Availability and Warehouse Assignment
      • Quote and Order Entry Automation
  • System Management
    • Introduction
    • Authentication and Authorization
      • Identity and Access Management (IAM)
      • Auth0
      • Emporix Single Sign-On (SSO)
    • Webhook Event Publishing
      • HTTP Webhook Strategy - HMAC Configuration
      • HTTP Webhook Strategy - Integration with Azure Service Bus
      • HTTP Webhook Strategy - Integration with Amazon Simple Queue Service (SQS)
    • Search
      • Universal Search Connector
      • Search Configuration
      • Indexing Service
    • Optimistic Locking
  • Extensibility and Integrations
    • Extensibility Cases
      • External Products, Pricing and Fees
      • Enabling Custom Extensions
    • Integrations
      • SAP Integration
    • Payment Systems
      • PayPal
      • Saferpay
      • Spreedly Gateway
      • Unzer
    • Third Party Add-Ons
      • Emporix Contentful App
      • Emporix Builder.io Plugin
      • Magnolia Emporix Connector
      • Zendesk Emporix Connect
    • Powered by AI
      • AI Smart Config
      • AI Smart Import
  • Core Commerce
    • Introduction
    • AI Assistance
    • Carts
    • Catalogs
    • Categories
    • Coupons
    • Customer Management
      • Approvals
      • Assisted Buying
      • Customer Groups
      • Customer Segments
    • Data Localization
    • Delivery Cycle Management
    • Mixin Schemas
    • Media Management
    • Orders
      • Shared Orders
    • Pricing
      • Pricing (Legacy)
    • Products
      • Availability, location, and stock levels
      • Brands
      • Labels
    • Quotes
    • Returns
    • Reward Points Management
    • Sites
    • Tax Classes
      • Tax classes (Legacy)
    • Measurement Units
  • Management Dashboard
    • Introduction
    • Customer Management
      • Companies
      • Customers
      • Groups
      • Segments
      • Coupons
    • Quotes
      • Quotes
      • Status Codes
    • Orders
      • Orders
      • SEPA
      • Returns
    • Catalogs
      • Catalogs
      • Categories
    • Products
      • Products
      • Product Templates
      • Labels
      • Suppliers
      • Brands
      • AI for a Product Description
    • Pricing
      • Price Models
      • Price Lists
    • Settings
      • Sites
      • Shipping Zones and Methods
      • Delivery Times
      • Units
      • Tax
      • Countries
      • Currencies
      • Languages
      • System Preferences
      • Custom Entities
      • Mixin Schemas
    • Administration
      • Users and Groups
      • Extensions
      • API Statistics
      • Webhooks
    • Extensions
    • Custom Instances
  • Additional Resources
    • Glossary
    • Videos
    • Emporix Community
Powered by GitBook
LogoLogo

Resources

  • Emporix.com
  • Developer Policy
  • Terms of Use

Find us

  • LinkedIn

© 2025 Emporix. All Rights Reserved.

On this page
  • Reindexing data
  • Indexing strategies
  • Changing index strategy

Was this helpful?

Export as PDF
  1. System Management
  2. Search

Indexing Service

Configure search indexer to bring great searching experience on your storefront.

The Indexing Service is designed to help you configure the search index in your Emporix instance.

The Indexing Service is responsible for including all your resources, such as products, or categories, in the search index and make them searchable on your storefront. You have to enable your own indexing service on Emporix by providing your credentials for the index provider into CE platform. Currently, the supported index provider is Algolia. For more information how you can configure search, see Search Configuration.

The Indexing Service gives you the possibility to provide your own API keys to the indexing provider, separately for each tenant. This approach gives you more flexibility in configuration.

There are two groups of endpoints in the Indexing Service:

  • Secured endpoints - that require a security scope and serve managing configuration.

    Example response:

    {
      "active": true,
      "searchKey": "84dc4886f81f805c42bdd89d64de751a",
      "applicationId": "8AP2HABA2I",
      "indexName": "exampleTenant",
      "provider": "ALGOLIA",
      "writeKey": "51ebe89215dddcf85e5dacd5643d17e7"
    } 
  • Public endpoints - that do not require any security scopes and they can be used directly on a storefront. The public endpoints do not return a writeKey, but a searchKey only.

Even though the public endpoints do not require any scopes, an authorization token is required to complete the request.

Example response:

```
{
  "active": true,
  "searchKey": "84dc4886f81f805c42bdd89d64de751a",
  "applicationId": "8AP2HABA2I",
  "indexName": "exampleTenant",
  "provider": "ALGOLIA"  
}   
```

Reindexing data

Be aware that changing configuration for indexing provider isn't enough to apply your changes in the index. Usually, the indexing process of your data is triggered by changes done on your products, or dependant entities, such as category, price, media etc. There is a scheduler job that discovers the delta changes on the resource data and starts reindexing of the updated instances, so that they are searchable on the storefront. Applying the changes done to the search index configuration require updating all existing product data. To avoid updating all the data, there is a reindexing mechanism available. So, if you change the index configuration, remember to reindex all your product data by using the reindex endpoint.

Indexing strategies

As Emporix is a multi-site solution, data on each site may differ, such as availability or price. Therefore, site-aware data must be included in the index. The Indexing Service provides two index strategies:

  • MERGE: the default strategy. The strategy creates just a single index that contains information from all the sites. The site-aware information is stored in sitePrices and siteAvailabilities properties. These properties are maps where a key corresponds to a site code and a value corresponds to the price or availability object respectively. This approach is more performant as you have only one index.

See an example index with MERGE strategy
{
"name": [
  "Banana"
],
"localizedName": {
  "en": "Banana"
},
"categories": [
  "Food"
],
"popularity": 0,
"prices": [
  {
    "id": "659bd4e09862ec2ec136a61b",
    "itemId": {
      "itemType": "PRODUCT",
      "id": "659bd4bfb9ce7a0b975c33eb",
      "name": {
        "en": "Banana"
      }
    },
    "currency": "EUR",
    "originalAmount": 1.99,
    "effectiveAmount": 1.99,
    "location": {
      "countryCode": "DE"
    },
    "priceModelId": "63402c86af907617bb4e1234",
    "priceModel": {
      "id": "63402c86af907617bb4e1234",
      "name": {
        "en": "Default price model"
      },
      "description": {
        "en": "Default price model"
      },
      "includesTax": false,
      "measurementUnit": {
        "quantity": 1,
        "unitCode": "pc"
      },
      "tierDefinition": {
        "tierType": "BASIC",
        "tiers": [
          {
            "minQuantity": {
              "quantity": 0,
              "unitCode": "pc"
            },
            "id": "63402c86af907617bb4e9826"
          }
        ]
      }
    },
    "restrictions": {
      "validity": null,
      "siteCodes": [
        "main"
      ]
    },
    "tierValues": [
      {
        "id": "63402c86af907617bb4e9826",
        "priceValue": 1.99
      }
    ],
    "siteCode": "main"
  }
],
"description": [
  "Banana"
],
"localizedDescription": {
  "en": "Banana"
},
"image": "http://res.cloudinary.com/saas-ag/image/upload/v1704711465/lspaymentstage/media/659bd5286bec48360e3b3a83.jpg",
"code": "Banana",
"categoriesMissing": false,
"available": false,
"distributionChannel": [
  "ASSORTMENT"
],
"sitePrices": {
  "DE": [
    {
      "id": "659bd4f29862ec2ec136a61c",
      "itemId": {
        "itemType": "PRODUCT",
        "id": "659bd4bfb9ce7a0b975c33eb",
        "name": {
          "en": "Banana"
        }
      },
      "currency": "EUR",
      "originalAmount": 2.49,
      "effectiveAmount": 2.49,
      "location": {
        "countryCode": "DE"
      },
      "priceModelId": "63402c86af907617bb4e1234",
      "priceModel": {
        "id": "63402c86af907617bb4e1234",
        "name": {
          "en": "Default price model"
        },
        "description": {
          "en": "Default price model"
        },
        "includesTax": false,
        "measurementUnit": {
          "quantity": 1,
          "unitCode": "pc"
        },
        "tierDefinition": {
          "tierType": "BASIC",
          "tiers": [
            {
              "minQuantity": {
                "quantity": 0,
                "unitCode": "pc"
              },
              "id": "63402c86af907617bb4e9826"
            }
          ]
        }
      },
      "restrictions": {
        "validity": null,
        "siteCodes": [
          "DE",
          "FR"
        ]
      },
      "tierValues": [
        {
          "id": "63402c86af907617bb4e9826",
          "priceValue": 2.49
        }
      ],
      "siteCode": "DE"
    }
  ],
  "main": [
    {
      "id": "659bd4e09862ec2ec136a61b",
      "itemId": {
        "itemType": "PRODUCT",
        "id": "659bd4bfb9ce7a0b975c33eb",
        "name": {
          "en": "Banana"
        }
      },
      "currency": "EUR",
      "originalAmount": 1.99,
      "effectiveAmount": 1.99,
      "location": {
        "countryCode": "DE"
      },
      "priceModelId": "63402c86af907617bb4e1234",
      "priceModel": {
        "id": "63402c86af907617bb4e1234",
        "name": {
          "en": "Default price model"
        },
        "description": {
          "en": "Default price model"
        },
        "includesTax": false,
        "measurementUnit": {
          "quantity": 1,
          "unitCode": "pc"
        },
        "tierDefinition": {
          "tierType": "BASIC",
          "tiers": [
            {
              "minQuantity": {
                "quantity": 0,
                "unitCode": "pc"
              },
              "id": "63402c86af907617bb4e9826"
            }
          ]
        }
      },
      "restrictions": {
        "validity": null,
        "siteCodes": [
          "main"
        ]
      },
      "tierValues": [
        {
          "id": "63402c86af907617bb4e9826",
          "priceValue": 1.99
        }
      ],
      "siteCode": "main"
    }
  ],
  "FR": [
    {
      "id": "659bd4f29862ec2ec136a61c",
      "itemId": {
        "itemType": "PRODUCT",
        "id": "659bd4bfb9ce7a0b975c33eb",
        "name": {
          "en": "Banana"
        }
      },
      "currency": "EUR",
      "originalAmount": 2.49,
      "effectiveAmount": 2.49,
      "location": {
        "countryCode": "DE"
      },
      "priceModelId": "63402c86af907617bb4e1234",
      "priceModel": {
        "id": "63402c86af907617bb4e1234",
        "name": {
          "en": "Default price model"
        },
        "description": {
          "en": "Default price model"
        },
        "includesTax": false,
        "measurementUnit": {
          "quantity": 1,
          "unitCode": "pc"
        },
        "tierDefinition": {
          "tierType": "BASIC",
          "tiers": [
            {
              "minQuantity": {
                "quantity": 0,
                "unitCode": "pc"
              },
              "id": "63402c86af907617bb4e9826"
            }
          ]
        }
      },
      "restrictions": {
        "validity": null,
        "siteCodes": [
          "DE",
          "FR"
        ]
      },
      "tierValues": [
        {
          "id": "63402c86af907617bb4e9826",
          "priceValue": 2.49
        }
      ],
      "siteCode": "FR"
    }
  ]
},
"siteAvailabilities": {
  "DE": {
    "id": "DE:659bd4bfb9ce7a0b975c33eb",
    "stockLevel": 700,
    "productId": "659bd4bfb9ce7a0b975c33eb",
    "site": "DE",
    "available": false,
    "popularity": 0,
    "distributionChannel": "ASSORTMENT"
  },
  "main": {
    "id": "main:659bd4bfb9ce7a0b975c33eb",
    "stockLevel": 999,
    "productId": "659bd4bfb9ce7a0b975c33eb",
    "site": "main",
    "available": false,
    "popularity": 0,
    "distributionChannel": "ASSORTMENT"
  },
  "FR": {
    "id": "FR:659bd4bfb9ce7a0b975c33eb",
    "stockLevel": 50,
    "productId": "659bd4bfb9ce7a0b975c33eb",
    "site": "FR",
    "available": false,
    "popularity": 0,
    "distributionChannel": "ASSORTMENT"
  }
},
"category_assignments": [
  {
    "id": "2918ddc4-0c1c-4977-bb91-a4c366c535a6",
    "name": "Food",
    "localizedName": {
      "en": "Food"
    },
    "code": "food",
    "localizedSlug": {
      "en": "food"
    },
    "parent": null
  }
],
"category_levels": {
  "level0": [
    "Food"
  ]
},
"_tags": [
  "product",
  "published"
],
"category_ids": [
  "2918ddc4-0c1c-4977-bb91-a4c366c535a6"
],
"objectID": "urn:yaas:saasag:caasproduct:product:lspaymentstage;659bd4bfb9ce7a0b975c33eb"
}
  • SPLIT: an alternative strategy. The strategy creates as many indices as the number of sites declared in the system. The index item does not contain sitePrices and siteAvailabilities fields. All the site-aware fields are available on the root level. This approach may be more flexible as a particular index contains only information related to one site. But, the fields that are not site-aware, like description, name etc are duplicated across all the indices. The number of indices is significantly higher.

See an example index with SPLIT strategy
  {
  "name": [
    "Banana"
  ],
  "localizedName": {
    "en": "Banana"
  },
  "categories": [
    "Food"
  ],
  "popularity": 0,
  "prices": [
    {
      "id": "659bd4e09862ec2ec136a61b",
      "itemId": {
        "itemType": "PRODUCT",
        "id": "659bd4bfb9ce7a0b975c33eb",
        "name": {
          "en": "Banana"
        }
      },
      "currency": "EUR",
      "originalAmount": 1.99,
      "effectiveAmount": 1.99,
      "location": {
        "countryCode": "DE"
      },
      "priceModelId": "63402c86af907617bb4e1234",
      "priceModel": {
        "id": "63402c86af907617bb4e1234",
        "name": {
          "en": "Default price model"
        },
        "description": {
          "en": "Default price model"
        },
        "includesTax": false,
        "measurementUnit": {
          "quantity": 1,
          "unitCode": "pc"
        },
        "tierDefinition": {
          "tierType": "BASIC",
          "tiers": [
            {
              "minQuantity": {
                "quantity": 0,
                "unitCode": "pc"
              },
              "id": "63402c86af907617bb4e9826"
            }
          ]
        }
      },
      "restrictions": {
        "validity": null,
        "siteCodes": [
          "main"
        ]
      },
      "tierValues": [
        {
          "id": "63402c86af907617bb4e9826",
          "priceValue": 1.99
        }
      ],
      "siteCode": "main"
    }
  ],
  "description": [
    "Banana "
  ],
  "localizedDescription": {
    "en": "Banana "
  },
  "image": "http://res.cloudinary.com/saas-ag/image/upload/v1704711465/lspaymentstage/media/659bd5286bec48360e3b3a83",
  "code": "Banana",
  "categoriesMissing": false,
  "available": false,
  "distributionChannel": [
    "ASSORTMENT"
  ],
  "category_assignments": [
    {
      "id": "2918ddc4-0c1c-4977-bb91-a4c366c535a6",
      "name": "Food",
      "localizedName": {
        "en": "Food"
      },
      "code": "food",
      "localizedSlug": {
        "en": "food"
      },
      "parent": null
    }
  ],
  "category_levels": {
    "level0": [
      "Food"
    ]
  },
  "_tags": [
    "product",
    "published"
  ],
  "category_ids": [
    "2918ddc4-0c1c-4977-bb91-a4c366c535a6"
  ],
  "objectID": "urn:yaas:saasag:caasproduct:product:TENANT;659bd4bfb9ce7a0b975c33eb"
  }
  

Changing index strategy

Changing the index strategy can be done in the following ways:

  • System Preferences of the Emporix Management Dashboard: see the System Preferences.

  • API request to the Configuration Service

    (If there is an already existing configuration for your tenant, send PUT request to update configuration. If there is no configuration yet, first send the POST request to create one. If there is no configuration, the MERGE strategy is used by default.)

Please remain patient as propagating changes to the index strategy may take up to 1 hour, so you might not be able to see the changes instantly.

Example request with MERGE strategy

curl --location --request PUT 'https://api.emporix.io/configuration/{TENANT}/configurations/indexing_siteAwareFieldsStrategy' \
--header 'authorization: Bearer {TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "key": "indexing_siteAwareFieldsStrategy",
    "value": {
        "strategy": "MERGE"
    }
}'
Example request with SPLIT strategy

curl --location --request PUT 'https://api.emporix.io/configuration/{TENANT}/configurations/indexing_siteAwareFieldsStrategy' \
--header 'authorization: Bearer {TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "key": "indexing_siteAwareFieldsStrategy",
    "value": {
        "strategy": "SPLIT"
    }
}'
PreviousSearch ConfigurationNextOptimistic Locking

Last updated 1 month ago

Was this helpful?

Looking for API tutorials? Check out .

Looking for API reference? Check out the in the Emporix API Reference.

Indexing Service Tutorial
Indexing Service