Interface JackrabbitQuery
-
- All Known Implementing Classes:
MatchAllDocsQuery
,QueryHitsQuery
public interface JackrabbitQuery
JackrabbitQuery
defines an interface for Jackrabbit query implementations that are at the root of the lucene query tree. It gives the implementation the opportunity to execute in an optimized way returningQueryHits
instead of a result that is tied to Lucene.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description QueryHits
execute(JackrabbitIndexSearcher searcher, SessionImpl session, Sort sort)
Executes this query and returnsQueryHits
ornull
if this query should be executed using the regular Lucene API.
-
-
-
Method Detail
-
execute
QueryHits execute(JackrabbitIndexSearcher searcher, SessionImpl session, Sort sort) throws IOException
Executes this query and returnsQueryHits
ornull
if this query should be executed using the regular Lucene API.Important note: an implementation must not call
JackrabbitIndexSearcher.execute(Query, Sort, long, org.apache.jackrabbit.spi.Name)
with this query instance as a parameter, otherwise a stack overflow will occur.- Parameters:
searcher
- the jackrabbit index searcher.session
- the session that executes the query.sort
- the sort criteria that must be reflected in the returnedQueryHits
.- Returns:
- the query hits or
null
if the regular Lucene API should be used by the caller. - Throws:
IOException
- if an error occurs while executing the query.
-
-