Package com.attivio.sdk.search.facet
Class FilterBasedFacetRequest
- java.lang.Object
-
- com.attivio.sdk.search.facet.FacetRequest
-
- com.attivio.sdk.search.facet.FilterBasedFacetRequest
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<java.util.Map.Entry<java.lang.String,Query>>
public class FilterBasedFacetRequest extends FacetRequest implements java.lang.Iterable<java.util.Map.Entry<java.lang.String,Query>>
A FacetRequest whose buckets are defined byQueries.Each query that is added to this request will generate a hit count that would occur if this query were applied to the
QueryRequest. This hit count will be the bucket count in the returned facet response.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.attivio.sdk.search.facet.FacetRequest
FacetRequest.SortBy
-
-
Field Summary
-
Fields inherited from class com.attivio.sdk.search.facet.FacetRequest
DEFAULT_MAX_MEMORY_USAGE, DEFAULT_PRIMARY_SORT, DEFAULT_SAMPLE_MODE, DEFAULT_SECONDARY_SORT, DEFAULT_SORT_BY
-
-
Constructor Summary
Constructors Constructor Description FilterBasedFacetRequest()FilterBasedFacetRequest(java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.String label, Query filter)Request that a Bucket forfilterwill be returned.protected intaddParameters(java.lang.StringBuilder buffer, int index)booleanequals(java.lang.Object other)java.util.Collection<Query>filters()Get the filters for this FilterBasedFacetRequest.QuerygetFilter(java.lang.String label)java.util.Map<java.lang.String,Query>getFilters()inthashCode()booleanisFacetFinder()trueif the facet finder can replace this FacetRequest with a suggested FacetRequest.java.util.Iterator<java.util.Map.Entry<java.lang.String,Query>>iterator()Get an iterator over all filters.voidsetFacetFinder(boolean value)Set if FacetFinder is allowed to provide a suggestion for this FacetRequest.voidsetFilters(java.util.Map<java.lang.String,Query> value)static FacetRequestvalueOf(java.lang.String value)Parse a FacetRequest from a string.-
Methods inherited from class com.attivio.sdk.search.facet.FacetRequest
addName, addParameter, clone, getChildFacet, getDistributedMaxBuckets, getDistributedMinBucketCount, getField, getFieldExpression, getMaxBuckets, getMaxMemoryUsage, getMinBucketCount, getName, getPrimarySortOrder, getRawDistributedMaxBuckets, getRawDistributedMinBucketCount, getRawMaxBuckets, getRawMinBucketCount, getSecondarySortOrder, getShallowMode, getSortBy, isCalculateStatistics, setCalculateStatistics, setChildFacet, setDefaults, setDistributedMaxBuckets, setDistributedMaxBuckets, setDistributedMinBucketCount, setDistributedMinBucketCount, setField, setFieldExpression, setMaxBuckets, setMaxBuckets, setMaxMemoryUsage, setMinBucketCount, setMinBucketCount, setName, setPrimarySortOrder, setSecondarySortOrder, setShallowMode, setSortOrder, setSortOrder, setSortOrder, toFacetBuilder, toString, valueOf
-
-
-
-
Method Detail
-
isFacetFinder
public final boolean isFacetFinder()
trueif the facet finder can replace this FacetRequest with a suggested FacetRequest.This will replace a FacetRequest for a numeric field with a RangeFacetRequest when facet finder runs.
- Overrides:
isFacetFinderin classFacetRequest
-
setFacetFinder
public final void setFacetFinder(boolean value)
Set if FacetFinder is allowed to provide a suggestion for this FacetRequest.- Overrides:
setFacetFinderin classFacetRequest
-
getFilter
public Query getFilter(java.lang.String label)
-
getFilters
public java.util.Map<java.lang.String,Query> getFilters()
-
setFilters
public void setFilters(java.util.Map<java.lang.String,Query> value)
-
add
public void add(java.lang.String label, Query filter)Request that a Bucket forfilterwill be returned.
-
iterator
public java.util.Iterator<java.util.Map.Entry<java.lang.String,Query>> iterator()
Get an iterator over all filters.- Specified by:
iteratorin interfacejava.lang.Iterable<java.util.Map.Entry<java.lang.String,Query>>
-
filters
public java.util.Collection<Query> filters()
Get the filters for this FilterBasedFacetRequest.
-
addParameters
protected int addParameters(java.lang.StringBuilder buffer, int index)- Overrides:
addParametersin classFacetRequest
-
hashCode
public int hashCode()
- Overrides:
hashCodein classFacetRequest
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classFacetRequest
-
valueOf
public static FacetRequest valueOf(java.lang.String value)
Parse a FacetRequest from a string.
-
-