public interface FullTextQuery extends FullTextQuery, org.hibernate.query.spi.QueryImplementor
Query).
This also extends the JPA counterpart, FullTextQuery.
DOCUMENT, DOCUMENT_ID, EXPLANATION, ID, OBJECT_CLASS, SCORE, SPATIAL_DISTANCE, THIS| Modifier and Type | Method and Description |
|---|---|
FullTextQuery |
initializeObjectsWith(ObjectLookupMethod lookupMethod,
DatabaseRetrievalMethod retrievalMethod)
Refine the strategies used to load entities.
|
FullTextQuery |
limitExecutionTimeTo(long timeout,
TimeUnit timeUnit)
Limit the time used by Hibernate Search to execute the query.
|
FullTextQuery |
setCriteriaQuery(org.hibernate.Criteria criteria)
Defines the Database Query used to load the Lucene results.
|
FullTextQuery |
setFetchSize(int i) |
FullTextQuery |
setFilter(org.apache.lucene.search.Filter filter)
Deprecated.
|
FullTextQuery |
setFirstResult(int firstResult) |
FullTextQuery |
setFlushMode(javax.persistence.FlushModeType flushMode) |
FullTextQuery |
setHint(String hintName,
Object value) |
FullTextQuery |
setMaxResults(int maxResults) |
FullTextQuery |
setProjection(String... fields)
Defines the Lucene field names projected and returned in a query result
Each field is converted back to it's object representation, an Object[] being returned for each "row"
(similar to an HQL or a Criteria API projection).
|
FullTextQuery |
setResultTransformer(org.hibernate.transform.ResultTransformer transformer)
Deprecated.
|
FullTextQuery |
setSort(org.apache.lucene.search.Sort sort)
Allows to let lucene sort the results.
|
FullTextQuery |
setSpatialParameters(Coordinates center,
String fieldName)
Defines the center of the spatial search for this query to project distance in results
|
FullTextQuery |
setSpatialParameters(double latitude,
double longitude,
String fieldName)
Defines the center of the spatial search for this query to project distance in results
|
FullTextQuery |
setTimeout(long timeout,
TimeUnit timeUnit)
Define a timeout period for a given unit of time.
|
<T> T |
unwrap(Class<T> type) |
disableFullTextFilter, enableFullTextFilter, explain, getFacetManager, getResultSize, hasPartialResultsgetProducer, setOptionalEntityName, setOptionalId, setOptionalObjectaddQueryHint, getCacheMode, getCacheRegion, getComment, getFetchSize, getHibernateFlushMode, getLockOptions, getParameterMetadata, getQueryOptions, getQueryString, getResultList, getSingleResult, list, scroll, scroll, setBigDecimal, setBigDecimal, setBigInteger, setBigInteger, setBinary, setBinary, setBoolean, setBoolean, setByte, setByte, setCacheable, setCacheMode, setCacheRegion, setCalendar, setCalendar, setCalendarDate, setCalendarDate, setCharacter, setCharacter, setComment, setDate, setDate, setDouble, setDouble, setEntity, setEntity, setFloat, setFloat, setFlushMode, setHibernateFlushMode, setInteger, setInteger, setLocale, setLocale, setLockMode, setLockMode, setLockOptions, setLong, setLong, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameterList, setParameterList, setParameterList, setParameterList, setParameterList, setParameters, setProperties, setProperties, setReadOnly, setSerializable, setSerializable, setShort, setShort, setString, setString, setText, setText, setTime, setTime, setTimeout, setTimestamp, setTimestamp, stream, uniqueResult, uniqueResultOptional@Deprecated FullTextQuery setResultTransformer(org.hibernate.transform.ResultTransformer transformer)
setResultTransformer in interface FullTextQuerytransformer - the ResultTransformer to use during projectionthis for method chaining<T> T unwrap(Class<T> type)
unwrap in interface javax.persistence.QueryT - the type of the unwrapped objecttype - the type to unwrapIllegalArgumentException is thrown. Supported types are:
FullTextQuery setSort(org.apache.lucene.search.Sort sort)
FullTextQuerysetSort in interface FullTextQuerysort - The lucene sort object.@Deprecated FullTextQuery setFilter(org.apache.lucene.search.Filter filter)
FullTextQuerysetFilter in interface FullTextQueryfilter - The Lucene filter.FilterFullTextQuery setCriteriaQuery(org.hibernate.Criteria criteria)
FullTextQuerysetCriteriaQuery in interface FullTextQuerycriteria - a query defined using Criteriathis for method chainingFullTextQuery setProjection(String... fields)
FullTextQueryTwoWayFieldBridge
Unless notified in their JavaDoc, all built-in bridges are two-way. All @DocumentId fields are projectable by design.
If the projected field is not a projectable field, null is returned in the object[]setProjection in interface FullTextQueryfields - the fields to use for projectionthis for method chainingFullTextQuery setSpatialParameters(double latitude, double longitude, String fieldName)
FullTextQuerysetSpatialParameters in interface FullTextQuerylatitude - latitude of the search centerlongitude - longitude of the search centerfieldName - name of the spatial fieldthis for method chainingFullTextQuery setSpatialParameters(Coordinates center, String fieldName)
FullTextQuerysetSpatialParameters in interface FullTextQuerycenter - the search centerfieldName - name of the spatial fieldthis for method chainingFullTextQuery setFirstResult(int firstResult)
setFirstResult in interface FullTextQuerysetFirstResult in interface javax.persistence.QuerysetFirstResult in interface javax.persistence.TypedQueryFullTextQuery setMaxResults(int maxResults)
setMaxResults in interface FullTextQuerysetMaxResults in interface javax.persistence.QuerysetMaxResults in interface javax.persistence.TypedQueryFullTextQuery setHint(String hintName, Object value)
setHint in interface FullTextQuerysetHint in interface javax.persistence.QuerysetHint in interface javax.persistence.TypedQueryFullTextQuery setFlushMode(javax.persistence.FlushModeType flushMode)
setFlushMode in interface FullTextQuerysetFlushMode in interface javax.persistence.QuerysetFlushMode in interface javax.persistence.TypedQueryFullTextQuery setFetchSize(int i)
setFetchSize in interface org.hibernate.BasicQueryContractFullTextQuery setTimeout(long timeout, TimeUnit timeUnit)
FullTextQueryQueryTimeoutException is raised.setTimeout in interface FullTextQuerytimeout - time out periodtimeUnit - time out unitthis to allow method chainingFullTextQuery limitExecutionTimeTo(long timeout, TimeUnit timeUnit)
FullTextQueryFullTextQuery.hasPartialResults() returns true.limitExecutionTimeTo in interface FullTextQuerytimeout - time out periodtimeUnit - time out unitthis for method chainingFullTextQuery initializeObjectsWith(ObjectLookupMethod lookupMethod, DatabaseRetrievalMethod retrievalMethod)
FullTextQueryinitializeObjectsWith in interface FullTextQuerylookupMethod - lookup methodretrievalMethod - how to initilize an objectthis for method chainingCopyright © 2006–2017 Hibernate. All rights reserved.