# Class FacetQueryChecker (5.0.3)

    public final class FacetQueryChecker

Provides checks for faceted search related query options.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> FacetQueryChecker

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Methods

### checkDepth(Integer value)

    public static Integer checkDepth(Integer value)

Checks that a facet depth option is valid. The facet depth must
be greater than 0 and less than [SearchApiLimits#FACET_MAXIMUM_DEPTH](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_FACET_MAXIMUM_DEPTH).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html` the facet depth option to check |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html` | the facet depth |

### checkDiscoveryLimit(int value)

    public static int checkDiscoveryLimit(int value)

Checks that a discovery limit is valid. The value must
be greater than 0 and less than [SearchApiLimits#FACET_MAXIMUM_DISCOVERY_LIMIT](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_FACET_MAXIMUM_DISCOVERY_LIMIT).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` the discovery limit to check |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | the discovery limit |

### checkDiscoveryValueLimit(Integer value)

    public static Integer checkDiscoveryValueLimit(Integer value)

Checks whether discovery value limit option is valid. The discovery value limit must
be greater than 0 and less than [SearchApiLimits#FACET_MAXIMUM_VALUE_LIMIT](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_FACET_MAXIMUM_VALUE_LIMIT).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html` the discovery value limit to check |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html` | the discovery value limit |

### checkFacetValue(String value)

    public static String checkFacetValue(String value)

Checks that a value constraint is valid. The Value length must
be at least 1 and less than [SearchApiLimits#MAXIMUM_ATOM_LENGTH](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_MAXIMUM_ATOM_LENGTH).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the value constraint to check |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | the value constraint |

### checkValid(SearchServicePb.SearchParams params)

    public static SearchServicePb.SearchParams checkValid(SearchServicePb.SearchParams params)

Checks whether all options related to faceted search are valid.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `params` | `com.google.appengine.api.search.proto.SearchServicePb.SearchParams` the SearchParams to check |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.appengine.api.search.proto.SearchServicePb.SearchParams` | this checked SearchParams |

### checkValueLimit(Integer value)

    public static Integer checkValueLimit(Integer value)

Checks whether a value limit option is valid. The value limit must
be greater than 0 and less than [SearchApiLimits#FACET_MAXIMUM_VALUE_LIMIT](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.search.checkers.SearchApiLimits#com_google_appengine_api_search_checkers_SearchApiLimits_FACET_MAXIMUM_VALUE_LIMIT).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html` the value limit to check |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html` | the value limit |