|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CacheQuery
A cache-query is what will be returned when the getQuery() method is run on QueryFactory
. This object can
have methods such as list, setFirstResult,setMaxResults, setFetchSize, getResultSize and setSort.
QueryFactory#getQuery(org.apache.lucene.search.Query)
,
QueryFactory.getBasicQuery(String, String)
Method Summary | |
---|---|
void |
disableFullTextFilter(String name)
Disable a given filter by its name. |
org.hibernate.search.FullTextFilter |
enableFullTextFilter(String name)
Enable a given filter by its name. |
int |
getResultSize()
Gets the integer number of results. |
QueryIterator |
iterator()
Returns the results of a search as a QueryIterator . |
QueryIterator |
iterator(int fetchSize)
Returns the results of a search as a QueryIterator with a given integer parameter - the fetchSize. |
QueryIterator |
lazyIterator()
Calls the lazyIterator(int fetchSize) method but passes in a default 1 as a parameter. |
QueryIterator |
lazyIterator(int fetchSize)
Lazily loads the results from the Query as a QueryIterator with a given integer parameter - the
fetchSize. |
List<Object> |
list()
Returns the results of a search as a list. |
void |
setFilter(org.apache.lucene.search.Filter f)
Allows lucene to filter the results. |
void |
setFirstResult(int index)
Sets a result with a given index to the first result. |
void |
setMaxResults(int numResults)
Sets the maximum number of results to the number passed in as a parameter. |
void |
setSort(org.apache.lucene.search.Sort s)
Allows lucene to sort the results. |
Method Detail |
---|
List<Object> list()
QueryIterator iterator(int fetchSize)
QueryIterator
with a given integer parameter - the fetchSize.
fetchSize
- integer to be given to the implementation constructor.
QueryIterator iterator()
QueryIterator
. This calls iterator(int fetchSize)
but uses a default fetchSize of 1.
iterator
in interface Iterable
QueryIterator lazyIterator(int fetchSize)
QueryIterator
with a given integer parameter - the
fetchSize.
fetchSize
- integer to be passed into the lazy implementation of QueryIterator
QueryIterator lazyIterator()
lazyIterator(int fetchSize)
method but passes in a default 1 as a parameter.
void setFirstResult(int index)
index
- of result to be set to the first.
IllegalArgumentException
- if the index given is less than zero.void setMaxResults(int numResults)
numResults
- that are to be set to the maxResults.int getResultSize()
void setSort(org.apache.lucene.search.Sort s)
s
- - lucene sort objectorg.hibernate.search.FullTextFilter enableFullTextFilter(String name)
name
- of filter.
void disableFullTextFilter(String name)
name
- of filter.void setFilter(org.apache.lucene.search.Filter f)
f
- - lucene filter
|
Google Analytics | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |