Release SearchContext releaseables also post match filters / queries.

This commit is contained in:
Martijn van Groningen 2013-12-23 18:35:54 +01:00
parent 27b53b8edf
commit 682e9548c1
2 changed files with 4 additions and 2 deletions

View File

@ -206,10 +206,10 @@ public class TopChildrenQuery extends Query {
ParentDoc[] _parentDocs = value.v().values().toArray(ParentDoc.class);
Arrays.sort(_parentDocs, PARENT_DOC_COMP);
parentDocs.v().put(keys[i], _parentDocs);
value.release();
RecyclerUtils.release(value);
}
}
parentDocsPerReader.release();
RecyclerUtils.release(parentDocsPerReader);
return parentHitsResolved;
}

View File

@ -97,6 +97,8 @@ public class MatchedQueriesFetchSubPhase implements FetchSubPhase {
}
} catch (IOException e) {
// ignore
} finally {
SearchContext.current().clearReleasables();
}
}
}