Class QueryHitsQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.jackrabbit.core.query.lucene.QueryHitsQuery
-
- All Implemented Interfaces:
Serializable,Cloneable,JackrabbitQuery
public class QueryHitsQuery extends Query implements JackrabbitQuery
QueryHitsQueryexposes aQueryHitsimplementation again as a Lucene Query.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classQueryHitsQuery.QueryHitsQueryScorerthe scorer implementation for this query.classQueryHitsQuery.QueryHitsQueryWeightThe Weight implementation for this query.
-
Constructor Summary
Constructors Constructor Description QueryHitsQuery(QueryHits hits)Creates a new query based onQueryHits.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WeightcreateWeight(Searcher searcher)QueryHitsexecute(JackrabbitIndexSearcher searcher, SessionImpl session, Sort sort)Executes this query and returnsQueryHitsornullif this query should be executed using the regular Lucene API.voidextractTerms(Set<Term> terms)StringtoString(String field)
-
-
-
Method Detail
-
createWeight
public Weight createWeight(Searcher searcher) throws IOException
- Overrides:
createWeightin classQuery- Throws:
IOException
-
extractTerms
public void extractTerms(Set<Term> terms)
- Overrides:
extractTermsin classQuery
-
execute
public QueryHits execute(JackrabbitIndexSearcher searcher, SessionImpl session, Sort sort) throws IOException
Executes this query and returnsQueryHitsornullif 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.- Specified by:
executein interfaceJackrabbitQuery- 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
nullif the regular Lucene API should be used by the caller. - Throws:
IOException- if an error occurs while executing the query.
-
-