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 Detail

      • simpleQueryString

        @Deprecated
        SimpleQueryStringContext 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
      • all

        @Deprecated
        AllContext 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
        FacetContext 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
        SortContext 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