Skip to content

Commit

Permalink
Release parentDocs in TopChildrenQuery.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvg committed Dec 23, 2013
1 parent 27e89c2 commit 9c67be5
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -145,7 +145,9 @@ public Weight createWeight(IndexSearcher searcher) throws IOException {
}
}

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) {
Expand Down

0 comments on commit 9c67be5

Please sign in to comment.