Book Image

ElasticSearch Blueprints

Book Image

ElasticSearch Blueprints

Overview of this book

If you are a data enthusiast and would like to explore and specialize on search technologies based on Elasticsearch, this is the right book for you. A compelling case-to-case mapping of features and implementation of Elasticsearch to solve many real-world use cases makes this book the right choice to start and specialize on Elasticsearch.
Table of Contents (10 chapters)
9
Index

Limitations on a query on nested fields


There are some limitations to the nested object type. In the simple inner object type, each nested JSON object is treated independently. However, the act of defining the mapping for inner objects as a nested type lets you overcome this drawback. Also, the use of nested types has its disadvantages, which we are about to see:

  • Nested types are updation unfriendly. Updating the parent element information or child element information means that you need to reindex the whole document. Hence, if a new student is admitted to a school or when a new student leaves the school, the entire document has to be reindexed, along with the information of other students and the school. Remember, updating a document is nothing but a soft deletion and addition of documents under the hood.

  • You can't retrieve the nested object alone. Say you need to get information of a single student; this is not possible in this approach. You need to get the entire source of the document...