Fix processing of regex patterns in large terms facet requests
This commit is contained in:
parent
a3978402e5
commit
9cc0b7a28b
|
@ -211,12 +211,16 @@ 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)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (matcher != null && !matcher.reset(value).matches()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
InternalStringTermsFacet.StringEntry entry = new InternalStringTermsFacet.StringEntry(value, count);
|
InternalStringTermsFacet.StringEntry entry = new InternalStringTermsFacet.StringEntry(value, count);
|
||||||
ordered.add(entry);
|
ordered.add(entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
for (ReaderAggregator aggregator : aggregators) {
|
for (ReaderAggregator aggregator : aggregators) {
|
||||||
|
|
Loading…
Reference in New Issue