public final class QueryChecker
extends java.lang.Object
Query.| Constructor and Description |
|---|
QueryChecker() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
static SearchParams |
checkValidFast(SearchParams params)
Performs a fast check of the search parameters.
|
public static java.lang.String checkQuery(java.lang.String query)
query - the query to checkSearchQueryException - if the query is not parsablejava.lang.IllegalArgumentException - if the query is too longpublic static SearchParams checkValid(SearchParams params)
params - the SearchParams to checkjava.lang.IllegalArgumentException - if some part of the specification is
invalidSearchQueryException - if the query is unparsablepublic static SearchParams checkValidFast(SearchParams params)
params - the search parameters to checkjava.lang.IllegalArgumentException - if parameters are not valid