Release parentDocs in TopChildrenQuery.

This commit is contained in:
Martijn van Groningen 2013-12-23 13:12:50 +01:00
parent 27e89c2427
commit 9c67be5181
1 changed files with 3 additions and 1 deletions

View File

@ -145,7 +145,9 @@ public class TopChildrenQuery extends Query {
}
}
return new ParentWeight(rewrittenChildQuery.createWeight(searcher), parentDocs);
ParentWeight parentWeight = new ParentWeight(rewrittenChildQuery.createWeight(searcher), parentDocs);
searchContext.addReleasable(parentWeight);
return parentWeight;
}
int resolveParentDocuments(TopDocs topDocs, SearchContext context, Recycler.V<ObjectObjectOpenHashMap<Object, ParentDoc[]>> parentDocs) {