Class QueryChecker
- java.lang.Object
-
- com.google.appengine.api.search.checkers.QueryChecker
-
-
Constructor Summary
Constructors Constructor Description QueryChecker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringcheckQuery(String query)Checks that query is not null and is parsable.static com.google.appengine.api.search.proto.SearchServicePb.SearchParamscheckValid(com.google.appengine.api.search.proto.SearchServicePb.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.static com.google.appengine.api.search.proto.SearchServicePb.SearchParamscheckValidFast(com.google.appengine.api.search.proto.SearchServicePb.SearchParams params)Performs a fast check of the search parameters.
-
-
-
Method Detail
-
checkQuery
public static String checkQuery(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 parsableIllegalArgumentException- if the query is too long
-
checkValid
public static com.google.appengine.api.search.proto.SearchServicePb.SearchParams checkValid(com.google.appengine.api.search.proto.SearchServicePb.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:
IllegalArgumentException- if some part of the specification is invalidSearchQueryException- if the query is unparsable
-
checkValidFast
public static com.google.appengine.api.search.proto.SearchServicePb.SearchParams checkValidFast(com.google.appengine.api.search.proto.SearchServicePb.SearchParams params)
Performs a fast check of the search parameters. This method does not check if the query stored in the parameters parses.- Parameters:
params- the search parameters to check- Returns:
- this checked SearchParams
- Throws:
IllegalArgumentException- if parameters are not valid
-
-