# Implicit search terms

**URL:** https://discuss.elastic.co/t/implicit-search-terms/287710
**Category:** Elasticsearch
**Created:** [October 26, 2021, 3:35pm UTC](https://discuss.elastic.co/t/implicit-search-terms/287710 "2021-10-26T15:35:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Ramzay](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@Ramzay](https://discuss.elastic.co/u/Ramzay)
#### Post date: [October 26, 2021, 3:35pm UTC](https://discuss.elastic.co/t/implicit-search-terms/287710/1 "2021-10-26T15:35:22Z")

</div>

Our index contains documents with the optional field **Category**. We need to search by default only the documents that have no category, and search for the documents with category only if the specific category provided explicitly.  
We could not expect every search query to use `exist` query properly or at all. Yet, if search query does not explicitly provide a category, only documents that have no category should be returned.  
Could this requirement be implemented on the back end and how?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 26, 2021, 9:44pm UTC](https://discuss.elastic.co/t/implicit-search-terms/287710/2 "2021-10-26T21:44:01Z")

</div>

Welcome to our community! 😃

This is something your code would need to figure out when it receives the request, and then send the relevant query to Elasticsearch.

---

<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: [November 23, 2021, 9:44pm UTC](https://discuss.elastic.co/t/implicit-search-terms/287710/3 "2021-11-23T21:44:06Z")

</div>

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