org.apache.jackrabbit.core.query.lucene
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 returning QueryHits instead of a result that is tied to Lucene.


Method Summary
 QueryHits execute(JackrabbitIndexSearcher searcher, SessionImpl session, org.apache.lucene.search.Sort sort)
          Executes this query and returns QueryHits or null if this query should be executed using the regular Lucene API.
 

Method Detail

execute

QueryHits execute(JackrabbitIndexSearcher searcher,
                  SessionImpl session,
                  org.apache.lucene.search.Sort sort)
                  throws IOException
Executes this query and returns QueryHits or null if this query should be executed using the regular Lucene API.

Important note: an implementation must not call JackrabbitIndexSearcher#execute(Query, Sort, long) 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 returned QueryHits.
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.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.