org.hibernate.search.query.dsl

## Interface QueryBuilder

- All Known Implementing Classes:
    ConnectedQueryBuilder

      public interface QueryBuilder

  Builds up Lucene queries for a given entity type following the fluent API pattern.

  The resulting `Query` can be obtained from the final `Termination` object of the invocation chain.

  If required, the resulting `Query` instance can be modified or combined with other queries created via this fluent API or via the native Lucene API.
  Author:
    Emmanuel Bernard

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `AllContext` | `all()` Query matching all documents (typically mixed with a boolean query).
    `BooleanJunction<BooleanJunction>` | `bool()` Start for building a boolean query.
    `FacetContext` | `facet()` Build a facet query.
    `TermContext` | `keyword()` Build a term query (see `TermQuery`).
    `MoreLikeThisContext` | `moreLikeThis()` Build a query matching resembling content.
    `PhraseContext` | `phrase()` Build a phrase query (see `PhraseQuery`).
    `RangeContext` | `range()` Build a range query (see `TermRangeQuery`.
    `SimpleQueryStringContext` | `simpleQueryString()` Build a query from a simple query string.
    `SortContext` | `sort()` Build a sort that can be applied to a query execution.
    `SpatialContext` | `spatial()` Build a spatial query.

- - ### Method Detail

    - #### keyword

          TermContext keyword()

      Build a term query (see `TermQuery`).
      Returns:
        a `TermContext` instance for building the term query

    - #### range

          RangeContext range()

      Build a range query (see `TermRangeQuery`.
      Returns:
        a `RangeContext` instance for building the range query

    - #### phrase

          PhraseContext phrase()

      Build a phrase query (see `PhraseQuery`).
      Returns:
        a `PhraseContext` instance for building the phrase query

    - #### simpleQueryString

          SimpleQueryStringContext simpleQueryString()

      Build a query from a simple query string.
      Returns:
        a `SimpleQueryStringContext` instance for building a query from a simple query string

    - #### bool

          BooleanJunction<BooleanJunction> bool()

      Start for building a boolean query.
      Returns:
        a `BooleanJunction` instance for building the boolean query

    - #### all

          AllContext all()

      Query matching all documents (typically mixed with a boolean query).
      Returns:
        an `AllContext`

    - #### facet

          FacetContext facet()

      Build a facet query.
      Returns:
        the facet context as entry point for building the facet request

    - #### spatial

          SpatialContext spatial()

      Build a spatial query.
      Returns:
        the spatial context as entry point got building the spatial request

    - #### moreLikeThis

          MoreLikeThisContext moreLikeThis()

      Build a query matching resembling content. It uses an approach similar to Lucene's `MoreLikeThis`
      Returns:
        the entry point for building a more like this query

    - #### sort

          SortContext sort()

      Build a sort that can be applied to a query execution. When multiple sort definitions are expressed, they are processed in decreasing priority.
      Returns:
        the entry point for building a sort

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved