Google Cloud Platform
Java

QueryChecker (Google App Engine API for Java)

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.
    • Constructor Summary

      Constructors 
      Constructor and Description
      QueryChecker() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
      • checkValidFast

        public static SearchParams checkValidFast(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:
        java.lang.IllegalArgumentException - if parameters are not valid