2-node ES cluster (version 0.17.8) with parent-child mapping.
I indexed a document as a parent and then indexed a few documents as its
children.
If I go to url: http://node:9200//<child_type_name>/<child_id>?fields=_parent,_source
I get sometimes response with _parent field and sometimes without it.
If I continue to refresh this url in my browser, _parent field shows and
disappears alternatingly.
It suggests that this request is routed alternatingly to both ES nodes and
one node contains value of _parent field and second one doesn't.
Restart of node without this field solves problem.
In 0.17, realtime get, which works by getting the document indexed from the
transaction log, did not return the _parent field. Its fixed in 0.18. In
your case, probably one shard flushed and got the document from the index
itself, and another shard was getting it from the transaction log (fetching
_parent not supported in 0.17).
2-node ES cluster (version 0.17.8) with parent-child mapping.
I indexed a document as a parent and then indexed a few documents as its
children.
If I go to url: http://node:9200/
/<child_type_name>/<child_id>?fields=_parent,_source
I get sometimes response with _parent field and sometimes without it.
If I continue to refresh this url in my browser, _parent field shows and
disappears alternatingly.
It suggests that this request is routed alternatingly to both ES nodes and
one node contains value of _parent field and second one doesn't.
Restart of node without this field solves problem.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.