Don't "double" cache a facet filter / query facet, closes #734.
This commit is contained in:
parent
0e30ad90f5
commit
60b423b741
|
@ -42,7 +42,7 @@ public class FilterFacetCollector extends AbstractFacetCollector {
|
||||||
|
|
||||||
public FilterFacetCollector(String facetName, Filter filter, FilterCache filterCache) {
|
public FilterFacetCollector(String facetName, Filter filter, FilterCache filterCache) {
|
||||||
super(facetName);
|
super(facetName);
|
||||||
this.filter = filterCache.cache(filter);
|
this.filter = filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override protected void doSetNextReader(IndexReader reader, int docBase) throws IOException {
|
@Override protected void doSetNextReader(IndexReader reader, int docBase) throws IOException {
|
||||||
|
|
|
@ -48,9 +48,9 @@ public class QueryFacetCollector extends AbstractFacetCollector {
|
||||||
super(facetName);
|
super(facetName);
|
||||||
Filter possibleFilter = extractFilterIfApplicable(query);
|
Filter possibleFilter = extractFilterIfApplicable(query);
|
||||||
if (possibleFilter != null) {
|
if (possibleFilter != null) {
|
||||||
this.filter = filterCache.cache(possibleFilter);
|
this.filter = possibleFilter;
|
||||||
} else {
|
} else {
|
||||||
this.filter = filterCache.cache(new QueryWrapperFilter(query));
|
this.filter = new QueryWrapperFilter(query);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue