public Scorer scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) throws IOException {
ParentDoc[] readerParentDocs = parentDocs.get(reader.getCoreCacheKey());
if (readerParentDocs != null) {
return new ParentScorer(getSimilarity(searcher), readerParentDocs);
}
return new EmptyScorer(getSimilarity(searcher));
}