# Size of the facet in the query affects the number of results of specific facet

**URL:** <https://discuss.elastic.co/t/size-of-the-facet-in-the-query-affects-the-number-of-results-of-specific-facet/353296>\
**Category:** Elasticsearch\
**Created:** [February 14, 2024, 3:51pm UTC](https://discuss.elastic.co/t/size-of-the-facet-in-the-query-affects-the-number-of-results-of-specific-facet/353296 "2024-02-14T15:51:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Botran\_Quiros](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_botran_quiros/32/125222_2.png) [@Daniel\_Botran\_Quiros](https://discuss.elastic.co/u/Daniel_Botran_Quiros)\
**Post date:** [February 14, 2024, 3:51pm UTC](https://discuss.elastic.co/t/size-of-the-facet-in-the-query-affects-the-number-of-results-of-specific-facet/353296/1 "2024-02-14T15:51:27Z")

</div>

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:

```auto

{
  "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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 13, 2024, 3:51pm UTC](https://discuss.elastic.co/t/size-of-the-facet-in-the-query-affects-the-number-of-results-of-specific-facet/353296/2 "2024-03-13T15:51:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
