Fix processing of regex patterns in large terms facet requests

This commit is contained in:
Igor Motov 2011-11-10 18:27:11 -05:00 committed by Shay Banon
parent a3978402e5
commit 9cc0b7a28b
1 changed files with 7 additions and 3 deletions

View File

@ -211,10 +211,14 @@ public class TermsStringOrdinalsFacetCollector extends AbstractFacetCollector {
} while (agg != null && value.equals(agg.current)); } while (agg != null && value.equals(agg.current));
if (count > minCount) { if (count > minCount) {
if (excluded == null || !excluded.contains(value)) { if (excluded != null && excluded.contains(value)) {
InternalStringTermsFacet.StringEntry entry = new InternalStringTermsFacet.StringEntry(value, count); continue;
ordered.add(entry);
} }
if (matcher != null && !matcher.reset(value).matches()) {
continue;
}
InternalStringTermsFacet.StringEntry entry = new InternalStringTermsFacet.StringEntry(value, count);
ordered.add(entry);
} }
} }