# How does Elasticsearch search on multiple fields in the same query?

**URL:** <https://discuss.elastic.co/t/how-does-elasticsearch-search-on-multiple-fields-in-the-same-query/288272>\
**Category:** Elasticsearch\
**Created:** [November 2, 2021, 11:04pm UTC](https://discuss.elastic.co/t/how-does-elasticsearch-search-on-multiple-fields-in-the-same-query/288272 "2021-11-02T23:04:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexical](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexical/32/80534_2.png) [@Alexical](https://discuss.elastic.co/u/Alexical)\
**Post date:** [November 2, 2021, 11:04pm UTC](https://discuss.elastic.co/t/how-does-elasticsearch-search-on-multiple-fields-in-the-same-query/288272/1 "2021-11-02T23:04:13Z")

</div>

Hey, I have a decent enough idea of how various indexes work in SQL, how multicolumn index data structures are laid out, and how Postgres can use multiple different indexes by using each individually then doing bitmap operations.

I would like to develop more of an understanding of analogous concepts in Elasticsearch. I can find plenty of resources on how an inverted index, tokenization, etc work in isolation. How does Elasticsearch search on multiple fields at once, though?

---

<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:** [November 2, 2021, 11:16pm UTC](https://discuss.elastic.co/t/how-does-elasticsearch-search-on-multiple-fields-in-the-same-query/288272/2 "2021-11-02T23:16:33Z")

</div>

Welcome to our community! 😃

[What is Elasticsearch? | Elasticsearch Guide [7.15] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.15/elasticsearch-intro.html) is a good, general place to start on this topic.

However, by default you usually just query a single field in Elasticsearch, using this approach [Search your data | Elasticsearch Guide [7.15] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.15/search-your-data.html). You can use [Multi-match query | Elasticsearch Guide [7.15] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.15/query-dsl-multi-match-query.html) to query multiple fields.

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [November 3, 2021, 8:06am UTC](https://discuss.elastic.co/t/how-does-elasticsearch-search-on-multiple-fields-in-the-same-query/288272/3 "2021-11-03T08:06:03Z")

</div>

Here’s some details on recent optimisations [Faster Retrieval of Top Hits in Elasticsearch with Block-Max WAND | Elastic Blog](https://www.elastic.co/blog/faster-retrieval-of-top-hits-in-elasticsearch-with-block-max-wand)

---

<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:** [December 1, 2021, 8:06am UTC](https://discuss.elastic.co/t/how-does-elasticsearch-search-on-multiple-fields-in-the-same-query/288272/4 "2021-12-01T08:06:41Z")

</div>

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