# What is better: query several fields or single combined field?

**URL:** <https://discuss.elastic.co/t/what-is-better-query-several-fields-or-single-combined-field/102353>\
**Category:** Elasticsearch\
**Created:** [September 30, 2017, 4:15pm UTC](https://discuss.elastic.co/t/what-is-better-query-several-fields-or-single-combined-field/102353 "2017-09-30T16:15:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Illidan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/illidan/32/54264_2.png) [@Illidan](https://discuss.elastic.co/u/Illidan)\
**Post date:** [September 30, 2017, 4:15pm UTC](https://discuss.elastic.co/t/what-is-better-query-several-fields-or-single-combined-field/102353/1 "2017-09-30T16:15:48Z")

</div>

Let's assume I have something similar to IMDB (e.g. catalog of movies) and I want to store it in Elasticsearch.

Single Movie record contains Title, Description, and Categories (strings, e.g. "Children", "Action", etc).

Let's assume that users allowed to search a free text, which can be everything: words from title, from description or from categories (e.g. "movie for children").

I wondering, from search performance perspective, what is more efficient: to query on each of the fields, or to create a special big field which is a concatenation of all of the fields and then to query only on it.

Besides performance, is there any pros or cons for either of approaches?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 1, 2017, 8:47am UTC](https://discuss.elastic.co/t/what-is-better-query-several-fields-or-single-combined-field/102353/2 "2017-10-01T08:47:38Z")

</div>

> [@Illidan](#):
>
> create a special big field which is a concatenation of all of the fields

This already exists by default and is referred to as the [\_all field](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/mapping-all-field.html).

---

<div class="post-metadata">

**Author:** ![Illidan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/illidan/32/54264_2.png) [@Illidan](https://discuss.elastic.co/u/Illidan)\
**Post date:** [October 1, 2017, 10:24am UTC](https://discuss.elastic.co/t/what-is-better-query-several-fields-or-single-combined-field/102353/3 "2017-10-01T10:24:19Z")

</div>

Nice one.

In such scenario, I should exclude all fields from indexing, correct? (to avoid unnecessary indexing, in case I not planning to allow queries on specific fields)

---

<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 29, 2017, 10:24am UTC](https://discuss.elastic.co/t/what-is-better-query-several-fields-or-single-combined-field/102353/4 "2017-10-29T10:24:43Z")

</div>

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