Github user jpountz commented on a diff in the pull request: https://github.com/apache/lucene-solr/pull/345#discussion_r180496635 --- Diff: lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java --- @@ -151,6 +152,17 @@ public Explanation explain(LeafReaderContext context, int doc) throws IOExceptio } return Explanation.noMatch("Not a match"); } + + @Override + public Matches matches(LeafReaderContext context, int doc) throws IOException { + // The default implementation would delegate to the joinQuery's Weight, which + // matches on children. We need to match on the parent instead + Scorer scorer = scorer(context); + if (scorer == null || scorer.iterator().advance(doc) != doc) { + return null; + } --- End diff -- let's check the two-phase iterator here as well if applicable?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org