Skip to content
Browse files

Cleanup runtime facet data when close.

  • Loading branch information...
1 parent a1918d9 commit 4e783a5299a90105c29a53b330581e2c777fd712 @wonlay wonlay committed Oct 16, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 bobo-browse/src/main/java/com/browseengine/bobo/sort/SortCollector.java
View
14 bobo-browse/src/main/java/com/browseengine/bobo/sort/SortCollector.java
@@ -112,6 +112,13 @@ public void restoreRuntimeFacets() {
reader.setRuntimeFacetHandlerMap(_runtimeFacetMap);
reader.setRuntimeFacetDataMap(_runtimeFacetDataMap);
}
+
+ public void clearRuntimeFacetData() {
+ reader.clearRuntimeFacetData();
+ reader.clearRuntimeFacetHandler();
+ _runtimeFacetDataMap = null;
+ _runtimeFacetMap = null;
+ }
}
public FacetHandler<?> groupBy = null; // Point to the first element of groupByMulti to avoid array lookups.
@@ -277,6 +284,13 @@ public void close() {
if (!_closed)
{
_closed = true;
+ if (contextList != null)
+ {
+ for (CollectorContext context : contextList)
+ {
+ context.clearRuntimeFacetData();
+ }
+ }
if (docidarraylist != null) {
while(!docidarraylist.isEmpty())
{

0 comments on commit 4e783a5

Please sign in to comment.
Something went wrong with that request. Please try again.