Don't "double" cache a facet filter / query facet, closes #734.

This commit is contained in:
kimchy 2011-03-01 22:14:36 +02:00
parent 0e30ad90f5
commit 60b423b741
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ public class FilterFacetCollector extends AbstractFacetCollector {
public FilterFacetCollector(String facetName, Filter filter, FilterCache filterCache) {
super(facetName);
this.filter = filterCache.cache(filter);
this.filter = filter;
}
@Override protected void doSetNextReader(IndexReader reader, int docBase) throws IOException {

View File

@ -48,9 +48,9 @@ public class QueryFacetCollector extends AbstractFacetCollector {
super(facetName);
Filter possibleFilter = extractFilterIfApplicable(query);
if (possibleFilter != null) {
this.filter = filterCache.cache(possibleFilter);
this.filter = possibleFilter;
} else {
this.filter = filterCache.cache(new QueryWrapperFilter(query));
this.filter = new QueryWrapperFilter(query);
}
}