Migration Guide: Wrapper Version 1.3.0

Introduction

This guide outlines the changes introduced in version 1.3.0.

Localized Facet Filtering

Affected Endpoints

  • /api/v2/search
  • /api/v2/products
  • /api/v2/facet-options

Changes

Version 1.3.0 of the Wrapper can use the new SPARQUE API endpoint facet_options_lc, which returns the facet's options for the selected locale only. Additional configuration is required to use this endpoint.

Required SPARQUE Changes

The new stacked endpoint OBJ -> facet_options_lc/p/locale/{string}/p/attribute/{string} -> OBJ,DOUBLE must exist in the workspace. The logic to filter the facet options must be implemented in the strategy. There is no filtering added to the Wrapper itself.

Output example:

{
    "offset": 0,
    "count": 3,
    "type":     [
        "OBJ",
        "DOUBLE"
    ],
    "items": [
        {
            "rank": 1,
            "probability": 342,
            "tuple": [
                {
                    "id": "https://www.sparque.ai/ish/propertyvalue/Colour_of_product/Black_enUS",
                    "attributes": {
                        "id": "Black",
                        "name": "Colour_of_product",
                        "value": {"en-US": "Black"}
                      }
                },
                342
            ]
        }, [...]
  ]
}

Configuration

The Wrapper setting Localized Facet Filtering must be enabled for this endpoint to be used. This can be done in SPARQUE Hub.

Channel-Specific Fixed Facets

Affected Endpoints

  • /api/v2/search
  • /api/v2/products
  • /api/v2/facet-options

Changes

Calls from the Wrapper to the SPARQUE endpoint /e/fixedFacets will include the additional context parameter channel starting with version 1.3.0.

Required SPARQUE Changes

You can use the new parameter by providing the SPARQUE endpoint and incorporating the parameter into the corresponding strategy:

fixedFacets/p/channel/{STRING} -> OBJ

Category Tree Filtering and Caching

Affected Endpoints

  • /api/v2/categorytree

Changes

This release introduces several improvements and bug fixes related to the categorytree endpoint:

  • Resolved an issue where category trees with more than 10,000 nodes resulted in incomplete or empty responses. The wrapper has been updated to handle category trees with up to 100,000 nodes.
  • Fixed a caching issue where providing an EntryCategoryId could return cached results from requests made without or with a different EntryCategoryId. With release 1.3.0, the Wrapper now correctly considers the EntryCategoryId when storing and retrieving data from the cache.
  • Fixed an issue where the Levels parameter was ignored when an EntryCategoryId was provided, resulting in the full subtree being returned. Starting with version 1.3.0, the response now respects both parameters as provided.