Skip to content

Conversation

marangonico
Copy link
Contributor

Updated facets, filters, and aggregations to handle nested fields, enabling more flexible query structures. Adjusted logic to check for "nested" definitions and construct queries accordingly, ensuring compatibility with both standard and nested data structures.

This PR improves the handling of nested fields.

Let's take category as an example.
The following snippet shows how to add a facet for the category id.
A new dictionary key "nested" is needed with the "path" to be used.


OSCAR_ELASTICSEARCH_FACETS = [
    {
        "name": "categories.id",
        "label": "Category",
        "type": "term",
        "nested": {
            "path": "categories",
        }
}

Updated facets, filters, and aggregations to handle nested fields, enabling more flexible query structures. Adjusted logic to check for "nested" definitions and construct queries accordingly, ensuring compatibility with both standard and nested data structures.
Limita la versione di Elasticsearch supportata a <9 per garantire la compatibilità con le librerie esistenti. Questa modifica previene potenziali problemi con breaking changes nelle versioni future.
Corregge la sintassi del requisito per "elasticsearch" utilizzando una virgola anziché un punto e virgola. Garantisce compatibilità con le versioni future mantenendo l'intervallo specificato.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant