|
|
package com.yoho.search.consumer.index.agg;
|
|
|
|
|
|
import com.yoho.search.consumer.suggests.common.SuggestionConstants;
|
|
|
import com.yoho.search.core.es.agg.AbstractAggregation;
|
|
|
import java.util.Iterator;
|
|
|
import java.util.LinkedHashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
import org.elasticsearch.search.aggregations.AbstractAggregationBuilder;
|
|
|
import org.elasticsearch.search.aggregations.Aggregation;
|
|
|
import org.elasticsearch.search.aggregations.AggregationBuilders;
|
|
|
import org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation;
|
|
|
import org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation.Bucket;
|
|
|
import org.elasticsearch.search.aggregations.bucket.terms.support.IncludeExclude;
|
|
|
|
|
|
import java.util.Iterator;
|
|
|
import java.util.LinkedHashMap;
|
|
|
import java.util.Map;
|
|
|
import com.yoho.search.consumer.suggests.common.SuggestionConstants;
|
|
|
import com.yoho.search.core.es.agg.AbstractAggregation;
|
|
|
|
|
|
public abstract class AbstractTokenAggregation extends AbstractAggregation {
|
|
|
|
...
|
...
|
@@ -29,8 +31,8 @@ public abstract class AbstractTokenAggregation extends AbstractAggregation { |
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public AbstractAggregationBuilder getBuilder() {
|
|
|
return AggregationBuilders.terms(aggName()).field(fieldName()).size(size).minDocCount(minDocCount).include(".{2,15}");
|
|
|
public AbstractAggregationBuilder<?> getBuilder() {
|
|
|
return AggregationBuilders.terms(aggName()).field(fieldName()).size(size).minDocCount(minDocCount).includeExclude(new IncludeExclude(".{2,15}", null));
|
|
|
}
|
|
|
|
|
|
@Override
|
...
|
...
|
|