After doing some more digging it appears as though this is part of the semantics of how elasticsearch implements nested queries in NestedQueryParser which uses lucene's ToParentBlockJoin:
I would greatly appreciate a confirmation, but I think an elaboration in the ES docs to mention that it performs "inner join"-like semantics would be very useful to prevent confusion.
This is expected behaviour, when using the nested query all documents
without nested inner objects are automatically excluded.
It makes sense to explicitly document this behaviour.
After doing some more digging it appears as though this is part of the
semantics of how elasticsearch implements nested queries in
NestedQueryParser which uses lucene's ToParentBlockJoin:
I would greatly appreciate a confirmation, but I think an elaboration in
the ES docs to mention that it performs "inner join"-like semantics would
be very useful to prevent confusion.
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.