DATAES-10 Merged all changes from 'facets' branch
This commit is contained in:
@@ -47,6 +47,7 @@ import org.springframework.data.elasticsearch.annotations.Document;
|
||||
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;
|
||||
import org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter;
|
||||
import org.springframework.data.elasticsearch.core.facet.FacetMapper;
|
||||
import org.springframework.data.elasticsearch.core.facet.FacetRequest;
|
||||
import org.springframework.data.elasticsearch.core.facet.FacetResult;
|
||||
import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity;
|
||||
import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext;
|
||||
|
||||
@@ -17,7 +17,7 @@ package org.springframework.data.elasticsearch.core;
|
||||
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.springframework.data.elasticsearch.annotations.*;
|
||||
import org.springframework.data.elasticsearch.core.query.FacetRequest;
|
||||
import org.springframework.data.elasticsearch.core.facet.FacetRequest;
|
||||
import org.springframework.data.mapping.model.SimpleTypeHolder;
|
||||
import org.springframework.data.util.ClassTypeInformation;
|
||||
import org.springframework.data.util.TypeInformation;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.data.elasticsearch.core.query;
|
||||
package org.springframework.data.elasticsearch.core.facet;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
package org.springframework.data.elasticsearch.core.facet;
|
||||
|
||||
import org.elasticsearch.search.facet.Facet;
|
||||
import org.elasticsearch.search.facet.range.RangeFacet;
|
||||
import org.elasticsearch.search.facet.terms.TermsFacet;
|
||||
import org.springframework.data.elasticsearch.core.facet.result.Range;
|
||||
import org.springframework.data.elasticsearch.core.facet.result.RangeResult;
|
||||
import org.springframework.data.elasticsearch.core.facet.result.Term;
|
||||
import org.springframework.data.elasticsearch.core.facet.result.TermResult;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -11,19 +16,32 @@ import java.util.List;
|
||||
*/
|
||||
public class FacetMapper {
|
||||
|
||||
public static FacetResult parse(Facet facet){
|
||||
if(facet instanceof TermsFacet){
|
||||
public static FacetResult parse(Facet facet) {
|
||||
if (facet instanceof TermsFacet) {
|
||||
return parseTerm((TermsFacet) facet);
|
||||
}
|
||||
|
||||
if (facet instanceof RangeFacet) {
|
||||
return parseRange((RangeFacet) facet);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static FacetResult parseTerm(TermsFacet facet) {
|
||||
List<Term> terms = new ArrayList<Term>();
|
||||
for(TermsFacet.Entry entry:facet.getEntries()){
|
||||
terms.add(new Term(entry.getTerm().toString(),entry.getCount()));
|
||||
List<Term> entries = new ArrayList<Term>();
|
||||
for (TermsFacet.Entry entry : facet.getEntries()) {
|
||||
entries.add(new Term(entry.getTerm().toString(), entry.getCount()));
|
||||
}
|
||||
return new TermResult(facet.getName(),terms);
|
||||
return new TermResult(facet.getName(), entries);
|
||||
}
|
||||
|
||||
private static FacetResult parseRange(RangeFacet facet) {
|
||||
List<Range> entries = new ArrayList<Range>();
|
||||
for (RangeFacet.Entry entry : facet.getEntries()) {
|
||||
entries.add(new Range(entry.getFrom() == Double.NEGATIVE_INFINITY ? null : entry.getFrom(), entry.getTo() == Double.POSITIVE_INFINITY ? null : entry.getTo(), entry.getCount(), entry.getTotal(), entry.getTotalCount(), entry.getMin(), entry.getMax()));
|
||||
}
|
||||
return new RangeResult(facet.getName(), entries);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.data.elasticsearch.core.query;
|
||||
package org.springframework.data.elasticsearch.core.facet;
|
||||
|
||||
import org.elasticsearch.search.facet.FacetBuilder;
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
package org.springframework.data.elasticsearch.core.query;
|
||||
package org.springframework.data.elasticsearch.core.facet.request;
|
||||
|
||||
import org.elasticsearch.search.facet.FacetBuilder;
|
||||
import org.elasticsearch.search.facet.terms.TermsFacetBuilder;
|
||||
import org.springframework.data.elasticsearch.core.facet.FacetRequest;
|
||||
|
||||
import org.elasticsearch.search.facet.FacetBuilder;
|
||||
import org.springframework.data.elasticsearch.core.facet.FacetRequest;
|
||||
|
||||
/**
|
||||
* @author Artur Konczak
|
||||
@@ -0,0 +1,72 @@
|
||||
package org.springframework.data.elasticsearch.core.facet.request;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.elasticsearch.search.facet.FacetBuilder;
|
||||
import org.elasticsearch.search.facet.FacetBuilders;
|
||||
import org.elasticsearch.search.facet.range.RangeFacetBuilder;
|
||||
import org.springframework.data.elasticsearch.core.facet.AbstractFacetRequest;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Range facet for numeric fields
|
||||
*
|
||||
* @author Artur Konczak
|
||||
*/
|
||||
public class RangeFacetRequest extends AbstractFacetRequest {
|
||||
|
||||
private String field;
|
||||
private String keyField;
|
||||
private String valueField;
|
||||
|
||||
private List<Double> from = new ArrayList<Double>();
|
||||
private List<Double> to = new ArrayList<Double>();
|
||||
|
||||
public RangeFacetRequest(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public void setField(String field) {
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
public void setFields(String keyField, String valueField) {
|
||||
this.keyField = keyField;
|
||||
this.valueField = valueField;
|
||||
}
|
||||
|
||||
public void range(Double from, Double to) {
|
||||
if (from == null) {
|
||||
this.from.add(Double.NEGATIVE_INFINITY);
|
||||
} else {
|
||||
this.from.add(from);
|
||||
}
|
||||
|
||||
if (to == null) {
|
||||
this.to.add(Double.POSITIVE_INFINITY);
|
||||
} else {
|
||||
this.to.add(to);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public FacetBuilder getFacet() {
|
||||
Assert.notNull(getName(), "Facet name can't be a null !!!");
|
||||
Assert.isTrue(StringUtils.isNotBlank(field) || StringUtils.isNotBlank(keyField) && StringUtils.isNotBlank(valueField), "Please select field or key field and value field !!!");
|
||||
|
||||
RangeFacetBuilder builder = FacetBuilders.rangeFacet(getName());
|
||||
if (StringUtils.isNotBlank(keyField)) {
|
||||
builder.keyField(keyField).valueField(valueField);
|
||||
} else {
|
||||
builder.field(field);
|
||||
}
|
||||
Assert.notEmpty(from, "Please select at last one range");
|
||||
Assert.notEmpty(to, "Please select at last one range");
|
||||
for (int i = 0; i < from.size(); i++) {
|
||||
builder.addRange(from.get(i), to.get(i));
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package org.springframework.data.elasticsearch.core.facet.request;
|
||||
|
||||
import org.springframework.data.elasticsearch.core.facet.FacetRequest;
|
||||
|
||||
/**
|
||||
* Basic range facet
|
||||
*
|
||||
* @author Artur Konczak
|
||||
*/
|
||||
public class RangeFacetRequestBuilder {
|
||||
|
||||
RangeFacetRequest result;
|
||||
|
||||
public RangeFacetRequestBuilder(String name) {
|
||||
result = new RangeFacetRequest(name);
|
||||
}
|
||||
|
||||
public RangeFacetRequestBuilder field(String field) {
|
||||
result.setField(field);
|
||||
return this;
|
||||
}
|
||||
|
||||
public RangeFacetRequestBuilder fields(String keyField, String valueField) {
|
||||
result.setFields(keyField, valueField);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public RangeFacetRequestBuilder range(double from, double to) {
|
||||
result.range(from, to);
|
||||
return this;
|
||||
}
|
||||
|
||||
public RangeFacetRequestBuilder from(double from) {
|
||||
result.range(from, null);
|
||||
return this;
|
||||
}
|
||||
|
||||
public RangeFacetRequestBuilder to(double to) {
|
||||
result.range(null, to);
|
||||
return this;
|
||||
}
|
||||
|
||||
public RangeFacetRequestBuilder applyQueryFilter() {
|
||||
result.setApplyQueryFilter(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
public FacetRequest build() {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package org.springframework.data.elasticsearch.core.facet.request;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public enum TermFacetOrder {
|
||||
|
||||
ascTerm, descTerm, ascCount, descCount;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package org.springframework.data.elasticsearch.core.facet.request;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.elasticsearch.search.facet.FacetBuilder;
|
||||
import org.elasticsearch.search.facet.FacetBuilders;
|
||||
import org.elasticsearch.search.facet.terms.TermsFacet;
|
||||
import org.elasticsearch.search.facet.terms.TermsFacetBuilder;
|
||||
import org.springframework.data.elasticsearch.core.facet.AbstractFacetRequest;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Term facet
|
||||
*
|
||||
* @author Artur Konczak
|
||||
*/
|
||||
public class TermFacetRequest extends AbstractFacetRequest {
|
||||
|
||||
private String[] fields;
|
||||
private Object[] excludeTerms;
|
||||
private int size = 10;
|
||||
private TermFacetOrder order = TermFacetOrder.descCount;
|
||||
private boolean allTerms = false;
|
||||
private String regex = null;
|
||||
private int regexFlag = 0;
|
||||
|
||||
public TermFacetRequest(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public void setFields(String... fields) {
|
||||
this.fields = fields;
|
||||
}
|
||||
|
||||
public void setSize(int size) {
|
||||
Assert.isTrue(size >= 0, "Size should be bigger then zero !!!");
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public void setOrder(TermFacetOrder order) {
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public void setExcludeTerms(Object... excludeTerms) {
|
||||
this.excludeTerms = excludeTerms;
|
||||
}
|
||||
|
||||
public void setAllTerms(boolean allTerms) {
|
||||
this.allTerms = allTerms;
|
||||
}
|
||||
|
||||
public void setRegex(String regex) {
|
||||
this.regex = regex;
|
||||
}
|
||||
|
||||
public void setRegex(String regex, int regexFlag) {
|
||||
this.regex = regex;
|
||||
this.regexFlag = regexFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FacetBuilder getFacet() {
|
||||
Assert.notEmpty(fields, "Please select at last one field !!!");
|
||||
TermsFacetBuilder builder = FacetBuilders.termsFacet(getName()).fields(fields).size(size);
|
||||
switch (order) {
|
||||
|
||||
case descTerm:
|
||||
builder.order(TermsFacet.ComparatorType.REVERSE_TERM);
|
||||
break;
|
||||
case ascTerm:
|
||||
builder.order(TermsFacet.ComparatorType.TERM);
|
||||
break;
|
||||
case ascCount:
|
||||
builder.order(TermsFacet.ComparatorType.REVERSE_COUNT);
|
||||
break;
|
||||
default:
|
||||
builder.order(TermsFacet.ComparatorType.COUNT);
|
||||
}
|
||||
if (ArrayUtils.isNotEmpty(excludeTerms)) {
|
||||
builder.exclude(excludeTerms);
|
||||
}
|
||||
|
||||
if (allTerms) {
|
||||
builder.allTerms(allTerms);
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(regex)) {
|
||||
builder.regex(regex, regexFlag);
|
||||
}
|
||||
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package org.springframework.data.elasticsearch.core.facet.request;
|
||||
|
||||
import org.springframework.data.elasticsearch.core.facet.FacetRequest;
|
||||
|
||||
/**
|
||||
* Basic term facet
|
||||
*
|
||||
* @author Artur Konczak
|
||||
*/
|
||||
public class TermFacetRequestBuilder {
|
||||
|
||||
private TermFacetRequest result;
|
||||
|
||||
public TermFacetRequestBuilder(String name) {
|
||||
result = new TermFacetRequest(name);
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder fields(String... fields) {
|
||||
result.setFields(fields);
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder size(int size) {
|
||||
result.setSize(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder excludeTerms(Object... terms) {
|
||||
result.setExcludeTerms(terms);
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder allTerms() {
|
||||
result.setAllTerms(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder regex(String regex) {
|
||||
result.setRegex(regex);
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder regex(String regex, int regexFlag) {
|
||||
result.setRegex(regex, regexFlag);
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder ascTerm() {
|
||||
result.setOrder(TermFacetOrder.ascTerm);
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder descTerm() {
|
||||
result.setOrder(TermFacetOrder.descTerm);
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder ascCount() {
|
||||
result.setOrder(TermFacetOrder.ascCount);
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder descCount() {
|
||||
result.setOrder(TermFacetOrder.descCount);
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder applyQueryFilter() {
|
||||
result.setApplyQueryFilter(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
public FacetRequest build() {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package org.springframework.data.elasticsearch.core.facet.result;
|
||||
|
||||
/**
|
||||
* Single range
|
||||
*
|
||||
* @author Rizwan Idrees
|
||||
* @author Mohsin Husen
|
||||
* @author Artur Konczak
|
||||
* @author Jonathan Yan
|
||||
*/
|
||||
public class Range {
|
||||
|
||||
private Double from;
|
||||
private Double to;
|
||||
private long count;
|
||||
private double total;
|
||||
private double totalCount;
|
||||
private double min = Double.POSITIVE_INFINITY;
|
||||
private double max = Double.NEGATIVE_INFINITY;
|
||||
|
||||
public Range(Double from, Double to, long count, double total, double totalCount, double min, double max) {
|
||||
this.from = from;
|
||||
this.to = to;
|
||||
this.count = count;
|
||||
this.total = total;
|
||||
this.totalCount = totalCount;
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
}
|
||||
|
||||
public Double getFrom() {
|
||||
return from;
|
||||
}
|
||||
|
||||
public Double getTo() {
|
||||
return to;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return number of documents in range
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public long getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public double getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public double getTotalCount() {
|
||||
return totalCount;
|
||||
}
|
||||
|
||||
public double getMin() {
|
||||
return min;
|
||||
}
|
||||
|
||||
public double getMax() {
|
||||
return max;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.springframework.data.elasticsearch.core.facet.result;
|
||||
|
||||
import org.springframework.data.elasticsearch.core.facet.AbstactFacetResult;
|
||||
import org.springframework.data.elasticsearch.core.facet.FacetType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Basic term facet result
|
||||
*
|
||||
* @author Rizwan Idrees
|
||||
* @author Mohsin Husen
|
||||
* @author Artur Konczak
|
||||
* @author Jonathan Yan
|
||||
*/
|
||||
public class RangeResult extends AbstactFacetResult {
|
||||
|
||||
private List<Range> ranges;
|
||||
|
||||
public RangeResult(String name, List<Range> ranges) {
|
||||
super(name, FacetType.range);
|
||||
this.ranges = ranges;
|
||||
}
|
||||
|
||||
public List<Range> getRanges() {
|
||||
return ranges;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.data.elasticsearch.core.facet;
|
||||
package org.springframework.data.elasticsearch.core.facet.result;
|
||||
|
||||
/**
|
||||
* Single term
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.springframework.data.elasticsearch.core.facet;
|
||||
package org.springframework.data.elasticsearch.core.facet.result;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.data.elasticsearch.core.facet.AbstactFacetResult;
|
||||
import org.springframework.data.elasticsearch.core.facet.FacetType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -19,6 +19,7 @@ import org.elasticsearch.index.query.FilterBuilder;
|
||||
import org.elasticsearch.index.query.QueryBuilder;
|
||||
import org.elasticsearch.search.facet.FacetBuilder;
|
||||
import org.elasticsearch.search.sort.SortBuilder;
|
||||
import org.springframework.data.elasticsearch.core.facet.FacetRequest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -20,6 +20,7 @@ import org.elasticsearch.index.query.FilterBuilder;
|
||||
import org.elasticsearch.index.query.QueryBuilder;
|
||||
import org.elasticsearch.search.sort.SortBuilder;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.elasticsearch.core.facet.FacetRequest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -19,6 +19,7 @@ import org.elasticsearch.index.query.FilterBuilder;
|
||||
import org.elasticsearch.index.query.QueryBuilder;
|
||||
import org.elasticsearch.search.facet.FacetBuilder;
|
||||
import org.elasticsearch.search.sort.SortBuilder;
|
||||
import org.springframework.data.elasticsearch.core.facet.FacetRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
package org.springframework.data.elasticsearch.core.query;
|
||||
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.elasticsearch.search.facet.FacetBuilder;
|
||||
import org.elasticsearch.search.facet.FacetBuilders;
|
||||
import org.elasticsearch.search.facet.terms.TermsFacet;
|
||||
import org.elasticsearch.search.facet.terms.TermsFacetBuilder;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Basic term facet
|
||||
*
|
||||
* @author Artur Konczak
|
||||
*/
|
||||
public class TermFacetRequest extends AbstractFacetRequest {
|
||||
|
||||
private String[] fields;
|
||||
private int size = 10;
|
||||
private TermsFacet.ComparatorType order;
|
||||
|
||||
public TermFacetRequest(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public void setFields(String... fields) {
|
||||
this.fields = fields;
|
||||
}
|
||||
|
||||
public void setSize(int size) {
|
||||
Assert.isTrue(size <= 0, "Size should be bigger then zero !!!");
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public void ascTerm() {
|
||||
order = TermsFacet.ComparatorType.TERM;
|
||||
}
|
||||
|
||||
public void descTerm() {
|
||||
order = TermsFacet.ComparatorType.REVERSE_TERM;
|
||||
}
|
||||
|
||||
public void ascCount() {
|
||||
order = TermsFacet.ComparatorType.REVERSE_COUNT;
|
||||
}
|
||||
|
||||
public void descCount() {
|
||||
order = TermsFacet.ComparatorType.COUNT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FacetBuilder getFacet() {
|
||||
Assert.notEmpty(fields, "Please select at last one field !!!");
|
||||
TermsFacetBuilder builder = FacetBuilders.termsFacet(getName()).fields(fields).size(size);
|
||||
if (order != null) {
|
||||
builder.order(order);
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package org.springframework.data.elasticsearch.core.query;
|
||||
|
||||
/**
|
||||
* Basic term facet
|
||||
*
|
||||
* @author Artur Konczak
|
||||
*/
|
||||
public class TermFacetRequestBuilder {
|
||||
|
||||
private TermFacetRequest result;
|
||||
|
||||
public TermFacetRequestBuilder(String name) {
|
||||
result = new TermFacetRequest(name);
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder withFields(String... fields) {
|
||||
result.setFields(fields);
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder withSize(int size) {
|
||||
result.setSize(size);
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder ascTerm() {
|
||||
result.ascTerm();
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder descTerm() {
|
||||
result.descTerm();
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder ascCount() {
|
||||
result.ascCount();
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder descCount() {
|
||||
result.descCount();
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequestBuilder applyQueryFilter() {
|
||||
result.setApplyQueryFilter(true);
|
||||
return this;
|
||||
}
|
||||
|
||||
public TermFacetRequest build() {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user