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, hasPartialResults
getProducer, setOptionalEntityName, setOptionalId, setOptionalObject
addQueryHint, getCacheMode, getCacheRegion, getComment, getFetchSize, getHibernateFlushMode, getLockOptions, getParameterMetadata, getQueryString, getResultList, getResultStream, 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
determineProperBooleanType, determineProperBooleanType, getFlushMode, getHibernateFirstResult, getHibernateMaxResults, getNamedParameters, getQueryOptions, getReturnAliases, getReturnTypes, getTimeout, isCacheable, isReadOnly, iterate, setHibernateFirstResult, setHibernateMaxResults, setParameterList, setParameterList, setParameterList, setParameterList
@Deprecated FullTextQuery setResultTransformer(org.hibernate.transform.ResultTransformer transformer)
setResultTransformer
in interface FullTextQuery
transformer
- the ResultTransformer
to use during projectionthis
for method chaining<T> T unwrap(Class<T> type)
unwrap
in interface javax.persistence.Query
T
- the type of the unwrapped objecttype
- the type to unwrapIllegalArgumentException
is thrown. Supported types are:
FullTextQuery setSort(org.apache.lucene.search.Sort sort)
FullTextQuery
setSort
in interface FullTextQuery
sort
- The lucene sort object.@Deprecated FullTextQuery setFilter(org.apache.lucene.search.Filter filter)
FullTextQuery
setFilter
in interface FullTextQuery
filter
- The Lucene filter.Filter
FullTextQuery setCriteriaQuery(org.hibernate.Criteria criteria)
FullTextQuery
setCriteriaQuery
in interface FullTextQuery
criteria
- a query defined using Criteria
this
for method chainingFullTextQuery setProjection(String... fields)
FullTextQuery
TwoWayFieldBridge
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 FullTextQuery
fields
- the fields to use for projectionthis
for method chainingFullTextQuery setSpatialParameters(double latitude, double longitude, String fieldName)
FullTextQuery
setSpatialParameters
in interface FullTextQuery
latitude
- latitude of the search centerlongitude
- longitude of the search centerfieldName
- name of the spatial fieldthis
for method chainingFullTextQuery setSpatialParameters(Coordinates center, String fieldName)
FullTextQuery
setSpatialParameters
in interface FullTextQuery
center
- the search centerfieldName
- name of the spatial fieldthis
for method chainingFullTextQuery setFirstResult(int firstResult)
setFirstResult
in interface FullTextQuery
setFirstResult
in interface javax.persistence.Query
setFirstResult
in interface javax.persistence.TypedQuery
FullTextQuery setMaxResults(int maxResults)
setMaxResults
in interface FullTextQuery
setMaxResults
in interface javax.persistence.Query
setMaxResults
in interface javax.persistence.TypedQuery
FullTextQuery setHint(String hintName, Object value)
setHint
in interface FullTextQuery
setHint
in interface javax.persistence.Query
setHint
in interface javax.persistence.TypedQuery
FullTextQuery setFlushMode(javax.persistence.FlushModeType flushMode)
setFlushMode
in interface FullTextQuery
setFlushMode
in interface javax.persistence.Query
setFlushMode
in interface javax.persistence.TypedQuery
FullTextQuery setFetchSize(int i)
setFetchSize
in interface org.hibernate.BasicQueryContract<org.hibernate.query.CommonQueryContract>
FullTextQuery setTimeout(long timeout, TimeUnit timeUnit)
FullTextQuery
QueryTimeoutException
is raised.setTimeout
in interface FullTextQuery
timeout
- time out periodtimeUnit
- time out unitthis
to allow method chainingFullTextQuery limitExecutionTimeTo(long timeout, TimeUnit timeUnit)
FullTextQuery
FullTextQuery.hasPartialResults()
returns true.limitExecutionTimeTo
in interface FullTextQuery
timeout
- time out periodtimeUnit
- time out unitthis
for method chainingFullTextQuery initializeObjectsWith(ObjectLookupMethod lookupMethod, DatabaseRetrievalMethod retrievalMethod)
FullTextQuery
initializeObjectsWith
in interface FullTextQuery
lookupMethod
- lookup methodretrievalMethod
- how to initilize an objectthis
for method chainingCopyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.