public final class FacetOptions
extends java.lang.Object
FacetOptions
represents facet options such as the number of facets to discover
(discoveryLimit
), the number of values to be included in each discovered
facet (discoveryValueLimit
), and the depth of the results to check (depth
).
Note that discovery is disabled when discoveryLimit
is zero.
For example, to discover 10 facets with 5 values each over 1000 extended results:
FacetOptions facetOption = FacetOptions.newBuilder() .setDiscoverLimit(10) .setDiscoverValueLimit(5) .setDepth(1000) .build();
Modifier and Type | Class and Description |
---|---|
static class |
FacetOptions.Builder
Builder for
FacetOptions . |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getDepth()
Returns the number of documents from the search result to be analyzed for facet discovery
or null if unset.
|
java.lang.Integer |
getDiscoveryLimit()
Returns the number of facets to be discovered or null if unset.
|
java.lang.Integer |
getDiscoveryValueLimit()
Returns the maximum number of values for each discovered facet or null if unset.
|
static FacetOptions.Builder |
newBuilder()
Creates and returns an empty
FacetOptions.Builder . |
static FacetOptions.Builder |
newBuilder(FacetOptions options)
Creates and returns a
FacetOptions.Builder that reflects the given options. |
java.lang.String |
toString() |
public java.lang.Integer getDiscoveryLimit()
public java.lang.Integer getDiscoveryValueLimit()
public java.lang.Integer getDepth()
public static FacetOptions.Builder newBuilder()
FacetOptions.Builder
.FacetOptions.Builder
which can construct a facet options.public static FacetOptions.Builder newBuilder(FacetOptions options)
FacetOptions.Builder
that reflects the given options.options
- the options that the returned builder will reflect.public java.lang.String toString()
toString
in class java.lang.Object