Hi I have a query, which filters products and paginates the results (by ?size URL argument).
Is there a way to return just a page (?size=12) of products, but return the available product_tags for the whole lot (hits.total.value=147)?
{
"sort": [
{
"menu_order": {
"order": "ASC"
}
},
{
"name.keyword": {
"order": "ASC"
}
},
{
"id": {
"order": "DESC"
}
}
],
"query": {
"bool": {
"filter": [
{
"bool": {
"minimum_should_match": 1,
"should": [
{
"match": {
"status": "publish"
}
}
]
}
}
]
}
},
"aggs": {
"my-agg-name": {
"terms": {
"field": "tags.id"
}
}
}
}