Hello,
I am implementing App Search for an e-commerce, and I've just realized that the size of the facet in the queries affects to certain counts in the response.
My query is like this:
{
"query": "galletas",
"page": {
"size": 300,
"current": 1
},
"filters": {
"all": [
{
"all": [
{
"id_store": 1033
}
]
}
]
},
"sort": [
{
"name_product": "desc"
}
],
"facets": {
"brand": [
{
"type": "value",
"name": "brand_facet",
"size": 10
}
]
}
}
If brand facet size is ten, for certain brand Elasticsarch returns a value of 8. But, if I filter by this brand, I have 9 results. While I was researching what was happening, I've realized that if I increase the size ofe the facet from 10 to 100, the result for the same brand is now 9.
How can this be possible? My understanding is that size of the facet is the number of elements that I want to get for this specific field, but has nothing to be with the count. Isn't it?
Thanks in advance for the anwsers.