public class QueryHitsQuery extends org.apache.lucene.search.Query implements JackrabbitQuery
QueryHitsQuery
exposes a QueryHits
implementation again
as a Lucene Query.Modifier and Type | Class and Description |
---|---|
class |
QueryHitsQuery.QueryHitsQueryScorer
the scorer implementation for this query.
|
class |
QueryHitsQuery.QueryHitsQueryWeight
The Weight implementation for this query.
|
Constructor and Description |
---|
QueryHitsQuery(QueryHits hits)
Creates a new query based on
QueryHits . |
Modifier and Type | Method and Description |
---|---|
org.apache.lucene.search.Weight |
createWeight(org.apache.lucene.search.Searcher searcher) |
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. |
void |
extractTerms(Set<org.apache.lucene.index.Term> terms) |
String |
toString(String field) |
public org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.Searcher searcher) throws IOException
createWeight
in class org.apache.lucene.search.Query
IOException
public String toString(String field)
toString
in class org.apache.lucene.search.Query
public void extractTerms(Set<org.apache.lucene.index.Term> terms)
extractTerms
in class org.apache.lucene.search.Query
public QueryHits execute(JackrabbitIndexSearcher searcher, SessionImpl session, org.apache.lucene.search.Sort sort) throws IOException
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, org.apache.jackrabbit.spi.Name)
with this query instance as a parameter, otherwise a stack overflow will
occur.
execute
in interface JackrabbitQuery
searcher
- the jackrabbit index searcher.session
- the session that executes the query.sort
- the sort criteria that must be reflected in the returned
QueryHits
.null
if the regular Lucene API
should be used by the caller.IOException
- if an error occurs while executing the query.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.