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.
{
"error":{
"root_cause":[
{
"type":"illegal_state_exception",
"reason":"child query must only match non-parent docs, but parent docID=332 matched childScorer=class org.apache.lucene.search.ConjunctionScorer"
}
]
}
}
What am I doing wrong? I'm not even sure what this error means. It seems to be a low-level Lucene error.
Thanks.