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 void
add(java.lang.String label, Query filter)
Request that a Bucket forfilter
will be returned.protected int
addParameters(java.lang.StringBuilder buffer, int index)
boolean
equals(java.lang.Object other)
java.util.Collection<Query>
filters()
Get the filters for this FilterBasedFacetRequest.Query
getFilter(java.lang.String label)
java.util.Map<java.lang.String,Query>
getFilters()
int
hashCode()
boolean
isFacetFinder()
true
if 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.void
setFacetFinder(boolean value)
Set if FacetFinder is allowed to provide a suggestion for this FacetRequest.void
setFilters(java.util.Map<java.lang.String,Query> value)
static FacetRequest
valueOf(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()
true
if 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:
isFacetFinder
in classFacetRequest
-
setFacetFinder
public final void setFacetFinder(boolean value)
Set if FacetFinder is allowed to provide a suggestion for this FacetRequest.- Overrides:
setFacetFinder
in 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 forfilter
will be returned.
-
iterator
public java.util.Iterator<java.util.Map.Entry<java.lang.String,Query>> iterator()
Get an iterator over all filters.- Specified by:
iterator
in 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:
addParameters
in classFacetRequest
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classFacetRequest
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classFacetRequest
-
valueOf
public static FacetRequest valueOf(java.lang.String value)
Parse a FacetRequest from a string.
-
-