com.google.appengine.api.search

## Class Query.Builder

- java.lang.Object
- - com.google.appengine.api.search.Query.Builder

- Enclosing class:
    Query

      public static class Query.Builder
      extends java.lang.Object

  A builder which constructs Query objects.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Query` | `build()` Construct the message.
    `Query` | `build(java.lang.String queryString)` Build a `Query` from the query string and the parameters set on the `Query.Builder`.
    `Query.Builder` | `setOptions(QueryOptions.Builder optionsBuilder)` Sets the query options from a builder.
    `Query.Builder` | `setOptions(QueryOptions options)` Sets the query options.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### setOptions

          public Query.Builder setOptions(QueryOptions options)

      Sets the query options.
      Parameters:
        `options` - the `QueryOptions` to apply to the search results
      Returns:
        this builder

    - #### setOptions

          public Query.Builder setOptions(QueryOptions.Builder optionsBuilder)

      Sets the query options from a builder.
      Parameters:
        `optionsBuilder` - the `QueryOptions.Builder` build a {@link QueryOptions{ to apply to the search results
      Returns:
        this builder

    - #### build

          public Query build(java.lang.String queryString)

      Build a `Query` from the query string and the parameters set on the `Query.Builder`. A query string can be as simple as a single term ("foo"), or as complex as a boolean expression, including field names ("title:hello OR body:important -october").
      Parameters:
        `queryString` - the query string to parse and apply to an index
      Returns:
        the Query built from the parameters entered on this Builder including the queryString
      Throws:
        `SearchQueryException` - if the query string is invalid

    - #### build

          public Query build()

      Construct the message.
      Returns:
        the Query built from the parameters entered on this Builder
      Throws:
        `java.lang.IllegalArgumentException` - if the query string is invalid