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, hasPartialResultsgetProducer, setOptionalEntityName, setOptionalId, setOptionalObjectaddQueryHint, 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, uniqueResultOptionaldetermineProperBooleanType, determineProperBooleanType, getFlushMode, getHibernateFirstResult, getHibernateMaxResults, getNamedParameters, getQueryOptions, getReturnAliases, getReturnTypes, getTimeout, isCacheable, isReadOnly, iterate, setHibernateFirstResult, setHibernateMaxResults, setParameterList, setParameterList, setParameterList, setParameterListexecuteUpdate, getFirstResult, getHints, getLockMode, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, isBound@Deprecated FullTextQuery setResultTransformer(ResultTransformer transformer)
setResultTransformer in interface FullTextQuerytransformer - the ResultTransformer to use during projectionthis for method chaining<T> T unwrap(Class<T> type)
QueryPersistenceException is thrown.unwrap in interface 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(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(org.hibernate.search.spatial.Coordinates center, String fieldName)
FullTextQuerysetSpatialParameters in interface FullTextQuerycenter - the search centerfieldName - name of the spatial fieldthis for method chainingFullTextQuery setFirstResult(int firstResult)
QuerysetFirstResult in interface FullTextQuerysetFirstResult in interface QuerysetFirstResult in interface TypedQueryfirstResult - position of the first result,
numbered from 0FullTextQuery setMaxResults(int maxResults)
QuerysetMaxResults in interface FullTextQuerysetMaxResults in interface QuerysetMaxResults in interface TypedQuerymaxResults - maximum number of results to retrieveFullTextQuery setHint(String hintName, Object value)
QuerysetHint in interface FullTextQuerysetHint in interface QuerysetHint in interface TypedQueryhintName - name of the property or hintvalue - value for the property or hintFullTextQuery setFlushMode(FlushModeType flushMode)
QuerysetFlushMode in interface FullTextQuerysetFlushMode in interface QuerysetFlushMode in interface TypedQueryflushMode - flush modeFullTextQuery setFetchSize(int i)
QuerysetFetchSize in interface BasicQueryContract<CommonQueryContract>i - the fetch size hintthis, for method chainingQuery.getFetchSize()FullTextQuery 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(org.hibernate.search.query.ObjectLookupMethod lookupMethod, org.hibernate.search.query.DatabaseRetrievalMethod retrievalMethod)
FullTextQueryinitializeObjectsWith in interface FullTextQuerylookupMethod - lookup methodretrievalMethod - how to initilize an objectthis for method chainingCopyright © 2019 JBoss by Red Hat. All rights reserved.