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, be them created via this fluent API or using native Lucene APIs.

Author:
Emmanuel Bernard

Method Summary
 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 request
 TermContext keyword()
          Build a term query (see TermQuery).
 PhraseContext phrase()
          Build a phrase query (see PhraseQuery).
 RangeContext range()
          Build a range query (see TermRangeQuery.
 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 range query

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 request

Returns:
the facet context as entry point for building the facet request

spatial

SpatialContext spatial()
Build a spatial query



Copyright © 2006-2013 Red Hat Middleware, LLC. All Rights Reserved