# Them-based search

**URL:** <https://discuss.elastic.co/t/them-based-search/266161>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [March 3, 2021, 9:21pm UTC](https://discuss.elastic.co/t/them-based-search/266161 "2021-03-03T21:21:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amer\_Enaya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amer_enaya/32/84913_2.png) [@Amer\_Enaya](https://discuss.elastic.co/u/Amer_Enaya)\
**Post date:** [March 3, 2021, 9:21pm UTC](https://discuss.elastic.co/t/them-based-search/266161/1 "2021-03-03T21:21:13Z")

</div>

How can I build them-based search for grocery shopping for example if the customer searches for breakfast the app will show list of products tagged with breakfast only and if he searches for night-film-snacks it will display products tagged with this only ?

---

<div class="post-metadata">

**Author:** ![constancecchen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/constancecchen/32/71762_2.png) [@constancecchen](https://discuss.elastic.co/u/constancecchen)\
**Post date:** [March 4, 2021, 7:38pm UTC](https://discuss.elastic.co/t/them-based-search/266161/2 "2021-03-04T19:38:08Z")

</div>

Hey Amer! For what you're describing, I'd suggest using tags as a filter field and not necessarily search by itself.

Here's a quick & basic JSON example:

```json
[
  { "title": "cereal", "tag": "breakfast" },
  { "title": "bagel", "tag": "breakfast" },
  { "title": "popcorn", "tag": "night-film-snacks" }
]

```

You should be able to customize the Documents experience to filter by tag:

 ![Filtering by breakfast](https://us1.discourse-cdn.com/elastic/original/3X/3/e/3eaf4342366ec35416a4d24704dbf858541c54b5.png)

 ![Filtering by night-film-snacks](https://us1.discourse-cdn.com/elastic/original/3X/b/4/b468a8bf68acc5a074f664610196a9c9cf494a94.png)

If you go to the "Reference UI" link in the sidebar, you can set it up like so to generate a similar Search UI of your own:

 ![Reference UI setup](https://us1.discourse-cdn.com/elastic/original/3X/8/1/8124ac5a426879945848972f433730deb7ae10a8.png)

Hope that helps!

---

<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:** [April 1, 2021, 7:38pm UTC](https://discuss.elastic.co/t/them-based-search/266161/3 "2021-04-01T19:38:19Z")

</div>

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