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 void
addSchemaField(java.lang.String name)
Add a field to return schema field information.boolean
equals(java.lang.Object other)
java.lang.String
getField()
Get the field to request a facet for.FieldExpression
getFieldExpression()
Get theFieldExpression
to 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.int
hashCode()
boolean
isCountBuckets()
Get if buckets will be counted.boolean
isCountValues()
Get if buckets should include a value count in addition to a document count.boolean
isFacetFields()
true
if buckets for facet fields should be returned.boolean
isFacetFinder()
true
if the facet finder can replace this FacetRequest with a suggested FacetRequest.boolean
isIndexedFields()
true
if buckets for indexed fields should be returned.boolean
isRealTimeFields()
Get if real time fields are requested instead of regular fields.boolean
isSortFields()
true
if buckets for sort fields should be returned.boolean
isStoredFields()
true
if buckets for stored fields should be returned.void
setCountBuckets(boolean value)
Set if buckets will be counted.void
setCountValues(boolean value)
Set if buckets should include a value count in addition to a document count.void
setFacetFields(boolean value)
Set if facet fields should be returned.void
setFacetFinder(boolean value)
Set if FacetFinder is allowed to provide a suggestion for this FacetRequest.void
setField(java.lang.String name)
Set the field to request a facet for.void
setFieldExpression(FieldExpression value)
Set theFieldExpression
to request a facet for.void
setIndexedFields(boolean value)
Set if indexed fields should be returned.void
setRealTimeFields(boolean value)
Set if real time fields are requested instead of regular fields.void
setSchemaTypes(SchemaField.Type... args)
void
setSchemaTypes(java.util.List<SchemaField.Type> value)
void
setSortFields(boolean value)
Set if sort fields should be returned.void
setStoredFields(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:
setField
in classFacetRequest
-
getField
public java.lang.String getField()
Get the field to request a facet for.- Overrides:
getField
in classFacetRequest
-
getFieldExpression
public FieldExpression getFieldExpression()
Description copied from class:FacetRequest
Get theFieldExpression
to request a facet for.- Overrides:
getFieldExpression
in classFacetRequest
-
setFieldExpression
public void setFieldExpression(FieldExpression value)
Description copied from class:FacetRequest
Set theFieldExpression
to request a facet for.- Overrides:
setFieldExpression
in classFacetRequest
-
isFacetFinder
public 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 void setFacetFinder(boolean value)
Set if FacetFinder is allowed to provide a suggestion for this FacetRequest.- Overrides:
setFacetFinder
in 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()
true
if buckets for stored fields should be returned.
-
setStoredFields
public void setStoredFields(boolean value)
Set if stored fields should be returned.
-
isIndexedFields
public boolean isIndexedFields()
true
if buckets for indexed fields should be returned.
-
setIndexedFields
public void setIndexedFields(boolean value)
Set if indexed fields should be returned.
-
isFacetFields
public boolean isFacetFields()
true
if buckets for facet fields should be returned.
-
setFacetFields
public void setFacetFields(boolean value)
Set if facet fields should be returned.
-
isSortFields
public boolean isSortFields()
true
if 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:
hashCode
in classFacetRequest
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classFacetRequest
-
-