public interface FullTextQuery extends FullTextQuery, QueryImplementor
Query
).
This also extends the JPA counterpart, FullTextQuery
.
Modifier and Type | Method and Description |
---|---|
FullTextQuery |
initializeObjectsWith(org.hibernate.search.query.ObjectLookupMethod lookupMethod,
org.hibernate.search.query.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(Criteria criteria)
Defines the Database Query used to load the Lucene results.
|
FullTextQuery |
setFetchSize(int i)
Sets a JDBC fetch size hint for the query.
|
FullTextQuery |
setFilter(org.apache.lucene.search.Filter filter)
Deprecated.
|
FullTextQuery |
setFirstResult(int firstResult)
Set the position of the first result to retrieve.
|
FullTextQuery |
setFlushMode(FlushModeType flushMode)
Set the flush mode type to be used for the query execution.
|
FullTextQuery |
setHint(String hintName,
Object value)
Set a query property or hint.
|
FullTextQuery |
setMaxResults(int maxResults)
Set the maximum number of results to retrieve.
|
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(ResultTransformer transformer)
Deprecated.
|
FullTextQuery |
setSort(org.apache.lucene.search.Sort sort)
Allows to let lucene sort the results.
|
FullTextQuery |
setSpatialParameters(org.hibernate.search.spatial.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)
Return an object of the specified type to allow access to
the provider-specific API.
|
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
executeUpdate, getFirstResult, getHints, getLockMode, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, isBound
@Deprecated FullTextQuery setResultTransformer(ResultTransformer transformer)
setResultTransformer
in interface FullTextQuery
transformer
- the ResultTransformer
to use during projectionthis
for method chaining<T> T unwrap(Class<T> type)
Query
PersistenceException
is thrown.unwrap
in interface 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(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(org.hibernate.search.spatial.Coordinates center, String fieldName)
FullTextQuery
setSpatialParameters
in interface FullTextQuery
center
- the search centerfieldName
- name of the spatial fieldthis
for method chainingFullTextQuery setFirstResult(int firstResult)
Query
setFirstResult
in interface FullTextQuery
setFirstResult
in interface Query
setFirstResult
in interface TypedQuery
firstResult
- position of the first result,
numbered from 0FullTextQuery setMaxResults(int maxResults)
Query
setMaxResults
in interface FullTextQuery
setMaxResults
in interface Query
setMaxResults
in interface TypedQuery
maxResults
- maximum number of results to retrieveFullTextQuery setHint(String hintName, Object value)
Query
setHint
in interface FullTextQuery
setHint
in interface Query
setHint
in interface TypedQuery
hintName
- name of the property or hintvalue
- value for the property or hintFullTextQuery setFlushMode(FlushModeType flushMode)
Query
setFlushMode
in interface FullTextQuery
setFlushMode
in interface Query
setFlushMode
in interface TypedQuery
flushMode
- flush modeFullTextQuery setFetchSize(int i)
Query
setFetchSize
in interface BasicQueryContract<CommonQueryContract>
i
- the fetch size hintthis
, for method chainingQuery.getFetchSize()
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(org.hibernate.search.query.ObjectLookupMethod lookupMethod, org.hibernate.search.query.DatabaseRetrievalMethod retrievalMethod)
FullTextQuery
initializeObjectsWith
in interface FullTextQuery
lookupMethod
- lookup methodretrievalMethod
- how to initilize an objectthis
for method chainingCopyright © 2019 JBoss by Red Hat. All rights reserved.