ES5 & parent/child & doc_value

Hi,
We are moving our platform from ES1.7.5 to ES5.4
We make much use of parent/child relations

In our ES1 version , the common queries with P/C criterias are often time and RAM consuming for our cluster.
And we hope very much to have enhancements at this level in the ES5 version

Regarding this thread, doc_values are now used for parent relations : https://github.com/elastic/elasticsearch/issues/6107

How can I be sure that my mappings/configs are the best at this level.
In our ES5 testbed, If I play with "has_child" queries then have a look to the /_nodes/stats/indices/fielddata I see fielddatas growing for the _parent fields :

"indices": {
        "fielddata": {
          "memory_size_in_bytes": 59035104,
          "evictions": 0,
          "fields": {
            "_parent": {
              "memory_size_in_bytes": 27161744
            },
            "topActivity.metaDatas.value.raw": {
              "memory_size_in_bytes": 4696384
            },
            "_parent#case": {
              "memory_size_in_bytes": 27161744
            },

Does-it seem OK ?

BR
Franck

So the _parent field only uses field data cache for the global ordinals that are built on top of the _parent field's doc value fields. Because of this the _parent field uses significantly less field data than it did before as the actual parent ids are no longer in the field data case.

The field data cache uses around 27MB for all your _parent fields. This looks OK to me.

parent/child in 5.x uses doc_values to access the parent relations but it also needs what we call global ordinals to compare parent id within segments of the same index. This is why fielddata for the _parent#case field reports some usage, global ordinals are loaded at search time and the memory size is added to the fielddata section of the indices stats.

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