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
QueryHitsQuery
exposes aQueryHits
implementation again as a Lucene Query.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
QueryHitsQuery.QueryHitsQueryScorer
the scorer implementation for this query.class
QueryHitsQuery.QueryHitsQueryWeight
The 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 Weight
createWeight(Searcher searcher)
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.void
extractTerms(Set<Term> terms)
String
toString(String field)
-
-
-
Method Detail
-
createWeight
public Weight createWeight(Searcher searcher) throws IOException
- Overrides:
createWeight
in classQuery
- Throws:
IOException
-
extractTerms
public void extractTerms(Set<Term> terms)
- Overrides:
extractTerms
in classQuery
-
execute
public 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.- Specified by:
execute
in 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
null
if the regular Lucene API should be used by the caller. - Throws:
IOException
- if an error occurs while executing the query.
-
-