Skip to content

Commit

Permalink
Do not show not filterable attributes as aggregate
Browse files Browse the repository at this point in the history
  • Loading branch information
lruozzi9 committed Jun 18, 2024
1 parent 07fb25b commit 2aa5044
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
24 changes: 12 additions & 12 deletions templates/query/common/aggs/attributes.json.twig
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"attributes": {
"filter": {
"bool": {
"filter": [
{
"term": {
"attributes.filterable": true
}
}
]
}
"nested": {
"path": "attributes"
},
"aggs": {
"filtered-attributes": {
"nested": {
"path": "attributes"
"filter": {
"bool": {
"filter": [
{
"term": {
"attributes.filterable": true
}
}
]
}
},
"aggs": {
"attribute": {
Expand Down
2 changes: 1 addition & 1 deletion templates/query/common/aggs/options.json.twig
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
}
},
"meta": {
"type": "option"
"type": "{{ constant('\\Webgriffe\\SyliusElasticsearchPlugin\\Model\\OptionFilter::TYPE') }}"
}
}
}
24 changes: 12 additions & 12 deletions templates/query/common/aggs/translated-attributes.json.twig
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"translated-attributes": {
"filter": {
"bool": {
"filter": [
{
"term": {
"translated-attributes.filterable": true
}
}
]
}
"nested": {
"path": "translated-attributes"
},
"aggs": {
"filtered-translated-attributes": {
"nested": {
"path": "translated-attributes"
"filter": {
"bool": {
"filter": [
{
"term": {
"translated-attributes.filterable": true
}
}
]
}
},
"aggs": {
"translated-attribute": {
Expand Down

0 comments on commit 2aa5044

Please sign in to comment.