# Performance... what is faster using 1 or 2 keyword field in term search?

**URL:** https://discuss.elastic.co/t/performance-what-is-faster-using-1-or-2-keyword-field-in-term-search/314185
**Category:** Elasticsearch
**Created:** [September 12, 2022, 10:41am UTC](https://discuss.elastic.co/t/performance-what-is-faster-using-1-or-2-keyword-field-in-term-search/314185 "2022-09-12T10:41:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kk123](https://avatars.discourse-cdn.com/v4/letter/k/e56c9b/32.png) [@kk123](https://discuss.elastic.co/u/kk123)
#### Post date: [September 12, 2022, 10:41am UTC](https://discuss.elastic.co/t/performance-what-is-faster-using-1-or-2-keyword-field-in-term-search/314185/1 "2022-09-12T10:41:29Z")

</div>

Hi, I have ILM based indices that have multiple keyword fields.

I want query the data based on these terms. As it turns out, the two keyword fields have the following property...

Keyword2 is unique across the all Keyword1  
Keyword1is NOT unique across all Keyword2

so if I am searching against Keyword2 I don't really need Keyword1 to get the data I want. However I wonder if using a bool AND filter with Keyword1 and Keyword2 is faster or slower than a query on just Keyword2?

Thoughts appreciated...

Thanks,  
Karl

---

<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: [October 10, 2022, 10:42am UTC](https://discuss.elastic.co/t/performance-what-is-faster-using-1-or-2-keyword-field-in-term-search/314185/2 "2022-10-10T10:42:17Z")

</div>

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