From b657c83f6378c5bb8e7ed0921680c429f7fe77b5 Mon Sep 17 00:00:00 2001 From: Lorenzo Ruozzi Date: Mon, 17 Jun 2024 12:46:24 +0200 Subject: [PATCH] Allow to add custom extra fields on search queries --- templates/query/search/query.json.twig | 4 ++-- templates/query/taxon/query.json.twig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/query/search/query.json.twig b/templates/query/search/query.json.twig index 1a21e52..cef596f 100644 --- a/templates/query/search/query.json.twig +++ b/templates/query/search/query.json.twig @@ -10,7 +10,7 @@ {% if filters|length > 0 %} ,{% include '@WebgriffeSyliusElasticsearchPlugin/query/search/search/' ~ filterType ~ '.json.twig' %} {% endif %} - {% endfor %} + {% endfor %}{% block extra_filter_fields %}{% endblock %} ], "should": [ { @@ -203,7 +203,7 @@ } } } - } + }{% block extra_should_fields %}{% endblock %} ] } } diff --git a/templates/query/taxon/query.json.twig b/templates/query/taxon/query.json.twig index 4274a7e..abc5961 100644 --- a/templates/query/taxon/query.json.twig +++ b/templates/query/taxon/query.json.twig @@ -26,7 +26,7 @@ {% if filters|length > 0 %} ,{% include '@WebgriffeSyliusElasticsearchPlugin/query/taxon/search/' ~ filterType ~ '.json.twig' %} {% endif %} - {% endfor %} + {% endfor %}{% block extra_filter_fields %}{% endblock %} ] } }