Nested types are slower?

https://www.elastic.co/guide/en/elasticsearch/guide/current/nested-objects.html
Not only that, because of the way that nested objects are indexed, joining the nested documents to the root document at query time is fast—almost as fast as if they were a single document.

https://www.elastic.co/guide/en/elasticsearch/reference/master/tune-for-search-speed.html
In particular, joins should be avoided. nested can make queries several times slower and parent-child relations can make queries hundreds of times slower. So if the same questions can be answered without joins by denormalizing documents, significant speedups can be expected.

I found this 2 references of nested objects on Elastic documentation, but don't know what which one is true.

When there are complaints about nested it is normally because of the inefficiency of updates if they require frequent change or the volume of Lucene docs created if there are many nested objects.
Speed of query is not normally a complaint.

1 Like

Ok, i'm trying everything to make our query faster. The index isn't really a problem, the problem is the query time. Gonna look more to find the solution.

Thanks!

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