com.google.appengine.api.search

## Class FacetOptions.Builder

- java.lang.Object
- - com.google.appengine.api.search.FacetOptions.Builder

- Enclosing class:
    FacetOptions

      public static final class FacetOptions.Builder
      extends java.lang.Object

  Builder for `FacetOptions`.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FacetOptions` | `build()` Returns an immutable `FacetOptions` that reflects the current state of this Builder.
    `FacetOptions.Builder` | `setDepth(int value)` Sets the number of documents from the search result to be analyzed for facet discovery.
    `FacetOptions.Builder` | `setDiscoveryLimit(int value)` Sets the number of facets to be discovered.
    `FacetOptions.Builder` | `setDiscoveryValueLimit(int value)` Sets the maximum number of values each discovered facet should have.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### setDiscoveryValueLimit

          public FacetOptions.Builder setDiscoveryValueLimit(int value)

      Sets the maximum number of values each discovered facet should have.
      Returns:
        this Builder
      Throws:
        `java.lang.IllegalArgumentException` - if value is negative or zero or greater than `SearchApiLimits.FACET_MAXIMUM_VALUE_LIMIT`

    - #### setDiscoveryLimit

          public FacetOptions.Builder setDiscoveryLimit(int value)

      Sets the number of facets to be discovered.
      Returns:
        this Builder
      Throws:
        `java.lang.IllegalArgumentException` - if the value is zero or negative or is larger than `SearchApiLimits.FACET_MAXIMUM_DISCOVERY_LIMIT`

    - #### setDepth

          public FacetOptions.Builder setDepth(int value)

      Sets the number of documents from the search result to be analyzed for facet discovery.
      Returns:
        this Builder
      Throws:
        `java.lang.IllegalArgumentException` - if the value is zero or negative or is larger than `SearchApiLimits.FACET_MAXIMUM_DEPTH`.

    - #### build

          public FacetOptions build()

      Returns an immutable `FacetOptions` that reflects the current state of this Builder.