Package com.google.appengine.api.search
Class FacetOptions
- java.lang.Object
-
- com.google.appengine.api.search.FacetOptions
-
public final class FacetOptions extends Object
AFacetOptionsrepresents 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 whendiscoveryLimitis 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();
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFacetOptions.BuilderBuilder forFacetOptions.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegergetDepth()Returns the number of documents from the search result to be analyzed for facet discovery or null if unset.IntegergetDiscoveryLimit()Returns the number of facets to be discovered or null if unset.IntegergetDiscoveryValueLimit()Returns the maximum number of values for each discovered facet or null if unset.static FacetOptions.BuildernewBuilder()Creates and returns an emptyFacetOptions.Builder.static FacetOptions.BuildernewBuilder(FacetOptions options)Creates and returns aFacetOptions.Builderthat reflects the given options.StringtoString()
-
-
-
Method Detail
-
getDiscoveryLimit
public Integer getDiscoveryLimit()
Returns the number of facets to be discovered or null if unset.
-
getDiscoveryValueLimit
public Integer getDiscoveryValueLimit()
Returns the maximum number of values for each discovered facet or null if unset.
-
getDepth
public Integer getDepth()
Returns the number of documents from the search result to be analyzed for facet discovery or null if unset.
-
newBuilder
public static FacetOptions.Builder newBuilder()
Creates and returns an emptyFacetOptions.Builder.- Returns:
- a
FacetOptions.Builderwhich can construct a facet options.
-
newBuilder
public static FacetOptions.Builder newBuilder(FacetOptions options)
Creates and returns aFacetOptions.Builderthat reflects the given options.- Parameters:
options- the options that the returned builder will reflect.- Returns:
- a new builder with values set from the given options.
-
-