Class FacetQueryChecker (2.0.0)

public final class FacetQueryChecker

Provides checks for faceted search related query options.

Inheritance

java.lang.Object > FacetQueryChecker

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.

Parameter
NameDescription
valueInteger

the facet depth option to check

Returns
TypeDescription
Integer

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.

Parameter
NameDescription
valueint

the discovery limit to check

Returns
TypeDescription
int

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.

Parameter
NameDescription
valueInteger

the discovery value limit to check

Returns
TypeDescription
Integer

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.

Parameter
NameDescription
valueString

the value constraint to check

Returns
TypeDescription
String

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
NameDescription
paramscom.google.appengine.api.search.proto.SearchServicePb.SearchParams

the SearchParams to check

Returns
TypeDescription
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.

Parameter
NameDescription
valueInteger

the value limit to check

Returns
TypeDescription
Integer

the value limit