Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.appengine.api.search.checkers
Class QueryChecker

    java.lang.Object
      com.google.appengine.api.search.checkers.QueryChecker

    public final class QueryChecker

extends java.lang.Object

Checks values of `Query`.

Field Summary
`static int` | `MAXIMUM_QUERY_LENGTH` The maximum length of a query string.

Constructor Summary
`QueryChecker()`

Method Summary
`static java.lang.String` | `checkQuery(java.lang.String query)` Checks that query is not null and is parsable.
`static SearchParams` | `checkValid(SearchParams params)` Checks the search specification is valid, specifically, has a valid index specification, a non-null query, a non-null number of documents to return specification, a valid cursor if present, valid sort specification list, a valid collection of field names for sorting, and a valid scorer specification.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MAXIMUM_QUERY_LENGTH

    public static final int MAXIMUM_QUERY_LENGTH

  The maximum length of a query string.

  See Also:
    Constant Field Values

Constructor Detail

### QueryChecker

    public QueryChecker()

Method Detail

### checkQuery

    public static java.lang.String checkQuery(java.lang.String query)

  Checks that query is not null and is parsable.

  Parameters:
    `query` - the query to check
  Returns:
    the checked query
  Throws:
    `SearchQueryException` - if the query is not parsable
    `java.lang.IllegalArgumentException` - if the query is too long

### checkValid

    public static SearchParams checkValid(SearchParams params)

  Checks the search specification is valid, specifically, has a valid index specification, a non-null query, a non-null number of documents to return specification, a valid cursor if present, valid sort specification list, a valid collection of field names for sorting, and a valid scorer specification.

  Parameters:
    `params` - the SearchParams to check
  Returns:
    this checked SearchParams
  Throws:
    `java.lang.IllegalArgumentException` - if some part of the specification is invalid
    `SearchQueryException` - if the query is unparsable

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD