Error using nested query: "child query must only match non-parent docs"

I'm trying to run a nested query in filter context, but when I do, I get the error below. I only get this error in 2.x. In 1.x, it works as expected (I'm currently migrating from 1.x to 2.x).

The nested query references the full field names (ie, is prefixed with the name of the top-level nested field). I did so following the response I received on another thread here. Strangely, when I remove that prefix, it also appears to work.

            "reason":"child query must only match non-parent docs, but parent docID=332 matched childScorer=class"

What am I doing wrong? I'm not even sure what this error means. It seems to be a low-level Lucene error.


Turns out I had the nested filter wrapped in another nested filter, and that was the reason for the problem. Sorry for the false alarm.

1 Like

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