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


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?

(Christian Dahlqvist) #2

This already exists by default and is referred to as the _all field.


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)

(system) #4

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