# Search UI: Facet only returns 20 values

**URL:** <https://discuss.elastic.co/t/search-ui-facet-only-returns-20-values/374452>\
**Category:** Elastic Search\
**Created:** [February 12, 2025, 7:33pm UTC](https://discuss.elastic.co/t/search-ui-facet-only-returns-20-values/374452 "2025-02-12T19:33:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanza-s](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanza-s/32/141330_2.png) [@tanza-s](https://discuss.elastic.co/u/tanza-s)\
**Post date:** [February 12, 2025, 7:33pm UTC](https://discuss.elastic.co/t/search-ui-facet-only-returns-20-values/374452/1 "2025-02-12T19:33:30Z")

</div>

Hello,  
I'm currently building a course catalog using Search UI. One of the facets we need to filter on is the "Subject" of the course. Right now, I can only get 20 of them to show up. I've tried to add `show={100}` as described in [this topic](https://discuss.elastic.co/t/search-ui-how-can-i-tell-facet-to-return-all-the-options-not-a-subset-with-more-button/312961), but it's not working. The "read more" button also caps out at 20. Is there some configuration I'm missing, or a different way to ensure they all show up? The facets _are_ there — when I type them into the autocomplete of the facet or if I use a search query, the rest of them will show up.

Thanks,  
Tanza

EDIT: I recognize that this question has been answered [here](https://github.com/elastic/search-ui/blob/main/ADVANCED.md#advanced-configuration) but the link to the documentation is a dead end.

---

<div class="post-metadata">

**Author:** ![tanza-s](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanza-s/32/141330_2.png) [@tanza-s](https://discuss.elastic.co/u/tanza-s)\
**Post date:** [February 12, 2025, 9:01pm UTC](https://discuss.elastic.co/t/search-ui-facet-only-returns-20-values/374452/2 "2025-02-12T21:01:00Z")

</div>

I figured it out. For future reference, you have to set the size in the facet config:

```auto
    facets: {
      "get_subject_filter": { type: "value", "sort": "value", "size": 100 },
    },

```

---

<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 12, 2025, 9:01pm UTC](https://discuss.elastic.co/t/search-ui-facet-only-returns-20-values/374452/3 "2025-03-12T21:01:12Z")

</div>

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