# Necessary to index a keyword field for exists query?

**URL:** <https://discuss.elastic.co/t/necessary-to-index-a-keyword-field-for-exists-query/278294>\
**Category:** Elasticsearch\
**Created:** [July 9, 2021, 4:31pm UTC](https://discuss.elastic.co/t/necessary-to-index-a-keyword-field-for-exists-query/278294 "2021-07-09T16:31:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhinavkulkarni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhinavkulkarni/32/91428_2.png) [@abhinavkulkarni](https://discuss.elastic.co/u/abhinavkulkarni)\
**Post date:** [July 9, 2021, 4:31pm UTC](https://discuss.elastic.co/t/necessary-to-index-a-keyword-field-for-exists-query/278294/1 "2021-07-09T16:31:17Z")

</div>

Hi,

Let us say, I have a `User` schema - name, address, bio and website. The `website` field is a keyword, but potentially unbounded - that is, the total number of all possible unique websites is limitless.

I am interested in making queries wherein I filter for users that have a website (most don't). I would need to index the `website` field for this filter, right? I am worried about indexing a keyword field with potentially unbounded unique terms. Will this blow up the index? Am I, instead, better off creating a derivative `boolean` field `hasWebsite` and indexing that one instead?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [July 12, 2021, 8:46am UTC](https://discuss.elastic.co/t/necessary-to-index-a-keyword-field-for-exists-query/278294/2 "2021-07-12T08:46:26Z")

</div>

Take a look at the [ignore\_above mapping parameter](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/ignore-above.html).

---

<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:** [August 9, 2021, 8:46am UTC](https://discuss.elastic.co/t/necessary-to-index-a-keyword-field-for-exists-query/278294/3 "2021-08-09T08:46:43Z")

</div>

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