public class FacetRequestFactory extends Object
Syntax: facetName[:scope][([param1=paramvalue[, param2=paramvalue]...)]
Parameters:
|| Parameter || Type || Facet Types ||
| minBucketCount
| unsigned | All |
| maxBuckets
| integer | All |
| distributedMinBucketCount
| unsigned | All |
| distributedMaxBuckets
| integer | All |
| sortBy
| FacetRequest.SortBy
| All |
| primarySort
| Sort.SortOrder
| All |
| secondarySort
| Sort.SortOrder
| All |
| facetFinder
| boolean | All |
| statistics
| boolean | Discrete facets, Range Facets, Date Facets |
| field
| FieldExpression
| Discrete Facets, Range Facets, Schema Facet (if = .fields) |
| tokens
| boolean | Experimental: If true, will facet over raw tokens. |
| shallowMode
| ShallowMode
| Discrete facets, Range Facets, Date Facets |
| maxMemory
| long | All |
| case
| ScopeFacetRequest.CaseMode
| Scope Facets |
| range
| FacetRange
| Range Facets |
| filter
| complex | Filter Based Facets |
| realTimeFields
| boolean | Schema Facet |
| storedFields
| boolean | Schema Facet |
| facetFields
| boolean | Schema Facet |
| indexFields
| boolean | Schema Facet |
| sortFields
| boolean | Schema Facet |
| countBuckets
| boolean | Schema Facet |
| countValues
| boolean | Schema Facet |
| term
| String | Schema Facet |
| dateIntervals
| complex | Date Facet |
NOTE: This class is subject to change or removal.
Modifier and Type | Class and Description |
---|---|
static class |
FacetRequestFactory.SchemaFacetFilter |
Constructor and Description |
---|
FacetRequestFactory() |
Modifier and Type | Method and Description |
---|---|
void |
addFilterBucket(String label,
Query filter) |
void |
addRangeBucket(FacetRange range) |
void |
addSchemaFilter(FacetRequestFactory.SchemaFacetFilter filter,
boolean value)
Add/clear a filter for a schema facet.
|
void |
addTerm(String term)
NOTE: currently only applies to schema facet.
|
FacetRequest |
createDateFacet() |
ScopeFacetRequest.CaseMode |
getCaseMode()
NOTE: currently only applies to scope facets.
|
List<DateFacetRequest.DateFacetInterval> |
getDateIntervals()
Intervals for calendar based date faceting.
|
Integer |
getDistributedMaxBuckets()
Multi-partition tuning parameter.
|
Integer |
getDistributedMinBucketCount()
Multi-partition tuning parameter.
|
FacetRequest |
getFacetRequest() |
FieldExpression |
getField()
The field expression to facet over.
|
Map<String,Query> |
getFilterBuckets()
Filters to compute document frequencies for.
|
Integer |
getMaxBuckets()
Get the maximum number of buckets to return.
|
long |
getMaxMemoryUsage()
Max memory usage that should be used for facets.
|
Integer |
getMinBucketCount()
Get the minimum bucket count required for bucket to be returned.
|
String |
getName()
The name of the facet.
|
List<FacetRange> |
getRangeBuckets()
Ranges to compute document frequencies for.
|
Set<FacetRequestFactory.SchemaFacetFilter> |
getSchemaFilter()
Get the filter for fields to return for a schema facet.
|
String |
getScope()
The scope name for scope faceting.
|
Sort.SortOrder |
getSecondarySortOrder()
Secondary sort order for facet buckets.
|
ShallowMode |
getShallowMode()
Mode for computing shallow facets.
|
FacetRequest.SortBy |
getSortBy()
Sort specification for facet buckets.
|
Sort.SortOrder |
getSortOrder()
Primary sort order for facet buckets.
|
List<String> |
getTerms()
List of discrete facet buckets to return.
|
boolean |
isCountBuckets()
If
false buckets will not contain counts. |
boolean |
isCountValues()
If
true buckets will contain value counts in addition to document counts. |
boolean |
isFacetFields()
If
true facetable fields will be returned in schema facet. |
boolean |
isFacetFinder()
If
false facet finder will ignore this facet. |
boolean |
isIndexedFields()
If
true indexed fields will be returned in schema facet. |
boolean |
isRealTimeFields()
If
true schema facet will be computed over real time fields. |
boolean |
isSortFields()
If
true sortable fields will be returned in schema facet. |
boolean |
isStatistics()
true if statistics should be computed for facet. |
boolean |
isStoredFields()
If
true stored fields will be returned in schema facet. |
boolean |
isTokens()
true if faceting should occur over raw tokens.
|
void |
setCaseMode(ScopeFacetRequest.CaseMode value) |
void |
setCountBuckets(boolean value) |
void |
setCountValues(boolean value) |
void |
setDateIntervals(List<DateFacetRequest.DateFacetInterval> value) |
void |
setDistributedMaxBuckets(Integer value) |
void |
setDistributedMinBucketCount(Integer value) |
void |
setFacetFinder(boolean value) |
void |
setField(FieldExpression value) |
void |
setMaxBuckets(Integer value) |
void |
setMaxMemoryUsage(long value) |
void |
setMinBucketCount(Integer value) |
void |
setName(String value) |
void |
setRealTimeFields(boolean value) |
void |
setScope(String value) |
void |
setSecondarySortOrder(Sort.SortOrder value) |
void |
setShallowMode(ShallowMode value) |
void |
setSortBy(FacetRequest.SortBy value) |
void |
setSortOrder(Sort.SortOrder value) |
void |
setStatistics(boolean value) |
void |
setTokens(boolean value) |
static FacetRequestFactory |
valueOf(String value) |
static FacetRequestFactory |
valueOf(StringParser reader) |
public String getName()
This is the name that will be used for retreiving the facet response from the query response.
This will also be the field name that will be used for faceting (if otherwise not specified).
public void setName(String value)
public FieldExpression getField()
public void setField(FieldExpression value)
public String getScope()
If non-null, this is a Scope facet.
public void setScope(String value)
public boolean isTokens()
true if faceting should occur over raw tokens.
public void setTokens(boolean value)
public FacetRequest.SortBy getSortBy()
public void setSortBy(FacetRequest.SortBy value)
public List<DateFacetRequest.DateFacetInterval> getDateIntervals()
Syntax: dateIntervals=(resolution[(step)][,...]) or dateIntervals=auto
DateFacetRequest.DateFacetResolution
for interval.public void setDateIntervals(List<DateFacetRequest.DateFacetInterval> value)
public Sort.SortOrder getSortOrder()
public void setSortOrder(Sort.SortOrder value)
public Sort.SortOrder getSecondarySortOrder()
public void setSecondarySortOrder(Sort.SortOrder value)
public Integer getMaxBuckets()
If null
max buckets will use configured defaults.
public void setMaxBuckets(Integer value)
public Integer getDistributedMaxBuckets()
If null
configured defaults will be used.
public void setDistributedMaxBuckets(Integer value)
public Integer getMinBucketCount()
If null
min bucket count will use configured defaults.
public void setMinBucketCount(Integer value)
public Integer getDistributedMinBucketCount()
If null
configured defaults will be used.
public void setDistributedMinBucketCount(Integer value)
public boolean isStatistics()
true
if statistics should be computed for facet.public void setStatistics(boolean value)
public boolean isFacetFinder()
false
facet finder will ignore this facet.public void setFacetFinder(boolean value)
public ShallowMode getShallowMode()
public void setShallowMode(ShallowMode value)
public long getMaxMemoryUsage()
NOTE: this is just a hint.
public void setMaxMemoryUsage(long value)
public Set<FacetRequestFactory.SchemaFacetFilter> getSchemaFilter()
public boolean isStoredFields()
true
stored fields will be returned in schema facet.
NOTE: Only applies to schema facets.
public boolean isIndexedFields()
true
indexed fields will be returned in schema facet.
NOTE: Only applies to schema facets.
public boolean isFacetFields()
true
facetable fields will be returned in schema facet.
NOTE: Only applies to schema facets.
public boolean isSortFields()
true
sortable fields will be returned in schema facet.
NOTE: Only applies to schema facets.
public void addSchemaFilter(FacetRequestFactory.SchemaFacetFilter filter, boolean value)
public boolean isRealTimeFields()
true
schema facet will be computed over real time fields.
NOTE: Only applies to schema facet.
public void setRealTimeFields(boolean value)
public boolean isCountBuckets()
false
buckets will not contain counts.
If document frequencies are not needed, setting this to false
will result in faster computation.
NOTE: Currently only applies to schema facet.
public void setCountBuckets(boolean value)
public boolean isCountValues()
true
buckets will contain value counts in addition to document counts.
NOTE: Setting this to true
will result in slower facet computation.
NOTE: Currently only applies to schema facet.
public void setCountValues(boolean value)
public ScopeFacetRequest.CaseMode getCaseMode()
public void setCaseMode(ScopeFacetRequest.CaseMode value)
public List<String> getTerms()
NOTE: currently only supported by schema facet.
public void addTerm(String term)
public Map<String,Query> getFilterBuckets()
Syntax: filter=(label, queryfilter)
public List<FacetRange> getRangeBuckets()
public void addRangeBucket(FacetRange range)
public FacetRequest createDateFacet()
public FacetRequest getFacetRequest()
public static FacetRequestFactory valueOf(String value)
public static FacetRequestFactory valueOf(StringParser reader)
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.