|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FullTextQuery
The base interface for Lucene powered searches.
| Field Summary |
|---|
| Fields inherited from interface org.hibernate.search.ProjectionConstants |
|---|
BOOST, DOCUMENT, DOCUMENT_ID, EXPLANATION, ID, OBJECT_CLASS, SCORE, THIS |
| Method Summary | ||
|---|---|---|
void |
disableFullTextFilter(java.lang.String name)
Disable a given filter by its name |
|
FullTextFilter |
enableFullTextFilter(java.lang.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 |
|
int |
getResultSize()
Returns the number of hits for this search Caution: The number of results might be slightly different from list().size() because list() if the index is
not in sync with the database at the time of query. |
|
FullTextQuery |
setCriteriaQuery(org.hibernate.Criteria criteria)
Defines the Database Query used to load the Lucene results. |
|
FullTextQuery |
setFetchSize(int i)
Defines scrollable result fetch size as well as the JDBC fetch size |
|
FullTextQuery |
setFilter(org.apache.lucene.search.Filter filter)
Allows to use lucene filters. |
|
FullTextQuery |
setFirstResult(int firstResult)
{link:Query#setFirstResult} |
|
FullTextQuery |
setMaxResults(int maxResults)
{link:Query#setMaxResults} |
|
FullTextQuery |
setProjection(java.lang.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)
defines a result transformer used during projection, the Aliases provided are the projection aliases. |
|
FullTextQuery |
setSort(org.apache.lucene.search.Sort sort)
Allows to let lucene sort the results. |
|
|
unwrap(java.lang.Class<T> type)
return the underlying type if possible or IllegalArgumentException otherwise Supported types are: - org.apache.lucene.search.Query the underlying lucene query |
|
| Methods inherited from interface org.hibernate.Query |
|---|
executeUpdate, getNamedParameters, getQueryString, getReturnAliases, getReturnTypes, isReadOnly, iterate, 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, setInteger, setInteger, setLocale, setLocale, setLockMode, setLockOptions, setLong, setLong, setParameter, setParameter, setParameter, setParameter, setParameterList, setParameterList, setParameterList, setParameterList, setParameters, setProperties, setProperties, setReadOnly, setSerializable, setSerializable, setShort, setShort, setString, setString, setText, setText, setTime, setTime, setTimeout, setTimestamp, setTimestamp, uniqueResult |
| Method Detail |
|---|
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.
int getResultSize()
list().size() because list() if the index is
not in sync with the database at the time of query.
FullTextQuery setCriteriaQuery(org.hibernate.Criteria criteria)
FullTextQuery setProjection(java.lang.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[]
FullTextFilter enableFullTextFilter(java.lang.String name)
void disableFullTextFilter(java.lang.String name)
org.apache.lucene.search.Explanation explain(int documentId)
Explanation
object describing the score computation for the matching object/document
in the current query
documentId - Lucene Document id to be explain. This is NOT the object id
FullTextQuery setFirstResult(int firstResult)
setFirstResult in interface org.hibernate.QueryFullTextQuery setMaxResults(int maxResults)
setMaxResults in interface org.hibernate.QueryFullTextQuery setFetchSize(int i)
setFetchSize in interface org.hibernate.QueryFullTextQuery setResultTransformer(org.hibernate.transform.ResultTransformer transformer)
setResultTransformer in interface org.hibernate.Query<T> T unwrap(java.lang.Class<T> type)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||