Interface QueryBuilder


@Deprecated public interface QueryBuilder
Deprecated.
Instead of using Hibernate Search 5 APIs, get a org.hibernate.search.mapper.orm.session.SearchSession using org.hibernate.search.mapper.orm.Search#session(org.hibernate.Session), create a SearchQuery with org.hibernate.search.mapper.orm.session.SearchSession#search(Class), and define your predicates using SearchQueryWhereStep.where(Function). Refer to the migration guide for more information.
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

    Modifier and Type
    Method
    Description
    all()
    Deprecated.
    See the javadoc of this class for how to create predicates in Hibernate Search 6.
    Deprecated.
    See the javadoc of this class for how to create predicates in Hibernate Search 6.
    Deprecated.
    See the deprecation note on FacetContext.
    Deprecated.
    See the javadoc of this class for how to create predicates in Hibernate Search 6.
    Deprecated.
    See the javadoc of this class for how to create predicates in Hibernate Search 6.
    Deprecated.
    See the javadoc of this class for how to create predicates in Hibernate Search 6.
    Deprecated.
    See the javadoc of this class for how to create predicates in Hibernate Search 6.
    Deprecated.
    See the deprecation note on SortContext.
    Deprecated.
    See the javadoc of this class for how to create predicates in Hibernate Search 6.
  • Method Details

    • keyword

      Deprecated.
      See the javadoc of this class for how to create predicates in Hibernate Search 6. The equivalent predicate in Hibernate Search 6 is SearchPredicateFactory.match(). For wildcard predicates, use SearchPredicateFactory.wildcard().
      Build a term query (see TermQuery).
      Returns:
      a TermContext instance for building the term query
    • range

      Deprecated.
      See the javadoc of this class for how to create predicates in Hibernate Search 6. The equivalent predicate in Hibernate Search 6 is SearchPredicateFactory.range().
      Build a range query (see TermRangeQuery.
      Returns:
      a RangeContext instance for building the range query
    • phrase

      Deprecated.
      See the javadoc of this class for how to create predicates in Hibernate Search 6. The equivalent predicate in Hibernate Search 6 is SearchPredicateFactory.phrase().
      Build a phrase query (see PhraseQuery).
      Returns:
      a PhraseContext instance for building the phrase query
    • simpleQueryString

      Deprecated.
      See the javadoc of this class for how to create predicates in Hibernate Search 6. The equivalent predicate in Hibernate Search 6 is SearchPredicateFactory.simpleQueryString().
      Build a query from a simple query string.
      Returns:
      a SimpleQueryStringContext instance for building a query from a simple query string
    • bool

      Deprecated.
      See the javadoc of this class for how to create predicates in Hibernate Search 6. The equivalent predicate in Hibernate Search 6 is SearchPredicateFactory.bool().
      Start for building a boolean query.
      Returns:
      a BooleanJunction instance for building the boolean query
    • all

      Deprecated.
      See the javadoc of this class for how to create predicates in Hibernate Search 6. The equivalent predicate in Hibernate Search 6 is SearchPredicateFactory.matchAll().
      Query matching all documents (typically mixed with a boolean query).
      Returns:
      an AllContext
    • facet

      Deprecated.
      See the deprecation note on FacetContext.
      Build a facet query.
      Returns:
      the facet context as entry point for building the facet request
    • spatial

      SpatialContext spatial()
      Deprecated.
      See the javadoc of this class for how to create predicates in Hibernate Search 6. The equivalent predicate in Hibernate Search 6 is SearchPredicateFactory.spatial().
      Build a spatial query.
      Returns:
      the spatial context as entry point got building the spatial request
    • sort

      Deprecated.
      See the deprecation note on SortContext.
      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