Modifier and Type | Method and Description |
---|---|
void |
disableFullTextFilter(String name)
Disable a given filter by its name
|
org.hibernate.search.filter.FullTextFilter |
enableFullTextFilter(String name)
Enable a given filter by its name.
|
org.apache.lucene.search.Explanation |
explain(int documentId)
Return the Lucene
Explanation
object describing the score computation for the matching object/document
in the current query |
org.hibernate.search.query.engine.spi.FacetManager |
getFacetManager() |
int |
getResultSize()
Returns the number of hits for this search
Caution:
The number of results might be slightly different from
getResultList().size() because getResultList()
may be not in sync with the database at the time of query. |
boolean |
hasPartialResults()
*Experimental* API, subject to change or removal
When using
limitExecutionTimeTo(long, java.util.concurrent.TimeUnit) }, returns true if partial results are returned (ie if the time limit has been reached
and the result fetching process has been terminated. |
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)
*Experimental* API, subject to change or removal
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 |
setFilter(org.apache.lucene.search.Filter filter)
Allows to use lucene filters.
|
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)
Defines a result transformer used during projection
|
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
|
executeUpdate, getFirstResult, getFlushMode, getHints, getLockMode, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, getResultList, getSingleResult, isBound, setFirstResult, setFlushMode, setHint, setLockMode, setMaxResults, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, unwrap
FullTextQuery setSort(org.apache.lucene.search.Sort sort)
sort
- The lucene sort object.FullTextQuery setFilter(org.apache.lucene.search.Filter filter)
filter
- The lucene filter.this
for method chainingint getResultSize()
getResultList().size()
because getResultList()
may be not in sync with the database at the time of query.FullTextQuery setCriteriaQuery(Criteria criteria)
criteria
- a query defined using Criteria
this
for method chainingFullTextQuery setProjection(String... fields)
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[]fields
- the fields to use for projectionthis
for method chainingFullTextQuery setSpatialParameters(double latitude, double longitude, String fieldName)
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)
center
- the search centerfieldName
- name of the spatial fieldthis
for method chainingorg.hibernate.search.filter.FullTextFilter enableFullTextFilter(String name)
name
- the name of the filterFullTextFilter
object that allows filter parameter injectionvoid disableFullTextFilter(String name)
name
- the filter naneorg.hibernate.search.query.engine.spi.FacetManager getFacetManager()
FullTextQuery setResultTransformer(ResultTransformer transformer)
transformer
- the ResultTransformer
to use during projectionthis
for method chainingorg.apache.lucene.search.Explanation explain(int documentId)
Explanation
object describing the score computation for the matching object/document
in the current querydocumentId
- Lucene Document id to be explain. This is NOT the object idExplanation
FullTextQuery limitExecutionTimeTo(long timeout, TimeUnit timeUnit)
hasPartialResults()
returns true.timeout
- time out periodtimeUnit
- time out unitthis
for method chainingboolean hasPartialResults()
limitExecutionTimeTo(long, java.util.concurrent.TimeUnit)
}, returns true if partial results are returned (ie if the time limit has been reached
and the result fetching process has been terminated.true
if partial results are returned, false
otherwiseFullTextQuery initializeObjectsWith(org.hibernate.search.query.ObjectLookupMethod lookupMethod, org.hibernate.search.query.DatabaseRetrievalMethod retrievalMethod)
lookupMethod
- lookup methodretrievalMethod
- how to initilize an objectthis
for method chainingCopyright © 2016 JBoss by Red Hat. All rights reserved.