Package com.attivio.sdk.search.facet
Class SchemaFacetRequest
- java.lang.Object
-
- com.attivio.sdk.search.facet.FacetRequest
-
- com.attivio.sdk.search.facet.SchemaFacetRequest
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class SchemaFacetRequest extends FacetRequest
FacetRequest for getting the fields populated in documents for the search query.- 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 SchemaFacetRequest()SchemaFacetRequest(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSchemaField(java.lang.String name)Add a field to return schema field information.booleanequals(java.lang.Object other)java.lang.StringgetField()Get the field to request a facet for.FieldExpressiongetFieldExpression()Get theFieldExpressionto request a facet for.java.util.Set<java.lang.String>getSchemaFields()Get the schema fields being requested for this request.java.util.List<SchemaField.Type>getSchemaTypes()Get the allowed types for returned fields.inthashCode()booleanisCountBuckets()Get if buckets will be counted.booleanisCountValues()Get if buckets should include a value count in addition to a document count.booleanisFacetFields()trueif buckets for facet fields should be returned.booleanisFacetFinder()trueif the facet finder can replace this FacetRequest with a suggested FacetRequest.booleanisIndexedFields()trueif buckets for indexed fields should be returned.booleanisRealTimeFields()Get if real time fields are requested instead of regular fields.booleanisSortFields()trueif buckets for sort fields should be returned.booleanisStoredFields()trueif buckets for stored fields should be returned.voidsetCountBuckets(boolean value)Set if buckets will be counted.voidsetCountValues(boolean value)Set if buckets should include a value count in addition to a document count.voidsetFacetFields(boolean value)Set if facet fields should be returned.voidsetFacetFinder(boolean value)Set if FacetFinder is allowed to provide a suggestion for this FacetRequest.voidsetField(java.lang.String name)Set the field to request a facet for.voidsetFieldExpression(FieldExpression value)Set theFieldExpressionto request a facet for.voidsetIndexedFields(boolean value)Set if indexed fields should be returned.voidsetRealTimeFields(boolean value)Set if real time fields are requested instead of regular fields.voidsetSchemaTypes(SchemaField.Type... args)voidsetSchemaTypes(java.util.List<SchemaField.Type> value)voidsetSortFields(boolean value)Set if sort fields should be returned.voidsetStoredFields(boolean value)Set if stored fields should be returned.-
Methods inherited from class com.attivio.sdk.search.facet.FacetRequest
addName, addParameter, addParameters, clone, getChildFacet, getDistributedMaxBuckets, getDistributedMinBucketCount, getMaxBuckets, getMaxMemoryUsage, getMinBucketCount, getName, getPrimarySortOrder, getRawDistributedMaxBuckets, getRawDistributedMinBucketCount, getRawMaxBuckets, getRawMinBucketCount, getSecondarySortOrder, getShallowMode, getSortBy, isCalculateStatistics, setCalculateStatistics, setChildFacet, setDefaults, setDistributedMaxBuckets, setDistributedMaxBuckets, setDistributedMinBucketCount, setDistributedMinBucketCount, setMaxBuckets, setMaxBuckets, setMaxMemoryUsage, setMinBucketCount, setMinBucketCount, setName, setPrimarySortOrder, setSecondarySortOrder, setShallowMode, setSortOrder, setSortOrder, setSortOrder, toFacetBuilder, toString, valueOf, valueOf
-
-
-
-
Method Detail
-
setField
public void setField(java.lang.String name)
Set the field to request a facet for.- Overrides:
setFieldin classFacetRequest
-
getField
public java.lang.String getField()
Get the field to request a facet for.- Overrides:
getFieldin classFacetRequest
-
getFieldExpression
public FieldExpression getFieldExpression()
Description copied from class:FacetRequestGet theFieldExpressionto request a facet for.- Overrides:
getFieldExpressionin classFacetRequest
-
setFieldExpression
public void setFieldExpression(FieldExpression value)
Description copied from class:FacetRequestSet theFieldExpressionto request a facet for.- Overrides:
setFieldExpressionin classFacetRequest
-
isFacetFinder
public 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 void setFacetFinder(boolean value)
Set if FacetFinder is allowed to provide a suggestion for this FacetRequest.- Overrides:
setFacetFinderin classFacetRequest
-
isRealTimeFields
public boolean isRealTimeFields()
Get if real time fields are requested instead of regular fields.
-
setRealTimeFields
public void setRealTimeFields(boolean value)
Set if real time fields are requested instead of regular fields.
-
getSchemaTypes
public java.util.List<SchemaField.Type> getSchemaTypes()
Get the allowed types for returned fields.If empty, fields will be returned regardless of type.
-
setSchemaTypes
public void setSchemaTypes(java.util.List<SchemaField.Type> value)
-
setSchemaTypes
public void setSchemaTypes(SchemaField.Type... args)
-
getSchemaFields
public java.util.Set<java.lang.String> getSchemaFields()
Get the schema fields being requested for this request.
-
addSchemaField
public void addSchemaField(java.lang.String name)
Add a field to return schema field information.If using this method, buckets will only be returned for the requested fields.
-
isStoredFields
public boolean isStoredFields()
trueif buckets for stored fields should be returned.
-
setStoredFields
public void setStoredFields(boolean value)
Set if stored fields should be returned.
-
isIndexedFields
public boolean isIndexedFields()
trueif buckets for indexed fields should be returned.
-
setIndexedFields
public void setIndexedFields(boolean value)
Set if indexed fields should be returned.
-
isFacetFields
public boolean isFacetFields()
trueif buckets for facet fields should be returned.
-
setFacetFields
public void setFacetFields(boolean value)
Set if facet fields should be returned.
-
isSortFields
public boolean isSortFields()
trueif buckets for sort fields should be returned.
-
setSortFields
public void setSortFields(boolean value)
Set if sort fields should be returned.
-
isCountValues
public boolean isCountValues()
Get if buckets should include a value count in addition to a document count.NOTE: when enabled, buckets will be returned as
SchemaFieldBucket, which will include a value count.
-
setCountValues
public void setCountValues(boolean value)
Set if buckets should include a value count in addition to a document count.NOTE: when enabled, buckets will be returned as
SchemaFieldBucket, which will include a value count.
-
isCountBuckets
public boolean isCountBuckets()
Get if buckets will be counted.NOTE: if buckets are not counted, the counts returned for the buckets will not be accurate. In this case, the existance of a bucket will indicate that the field is populated in 1 or more documents matching the query. This is useful for determining the minimal schema for the documents that match a query.
-
setCountBuckets
public void setCountBuckets(boolean value)
Set if buckets will be counted.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classFacetRequest
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classFacetRequest
-
-