org.apache.jackrabbit.core.query.lucene
Class JackrabbitIndexSearcher
java.lang.Object
org.apache.lucene.search.Searcher
org.apache.lucene.search.IndexSearcher
org.apache.jackrabbit.core.query.lucene.JackrabbitIndexSearcher
- All Implemented Interfaces:
- Remote, EvaluationContext, org.apache.lucene.search.Searchable
public class JackrabbitIndexSearcher
- extends org.apache.lucene.search.IndexSearcher
- implements EvaluationContext
JackrabbitIndexSearcher implements an index searcher with
jackrabbit specific optimizations.
| Methods inherited from class org.apache.lucene.search.IndexSearcher |
close, doc, doc, explain, getIndexReader, maxDoc, rewrite, search, search, search |
| Methods inherited from class org.apache.lucene.search.Searcher |
createWeight, docFreqs, explain, getSimilarity, search, search, search, search, search, search, search, search, search, setSimilarity |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JackrabbitIndexSearcher
public JackrabbitIndexSearcher(SessionImpl s,
org.apache.lucene.index.IndexReader r,
ItemStateManager ism)
- Creates a new jackrabbit index searcher.
- Parameters:
s - the session that executes the query.r - the index reader.ism - the shared item state manager.
execute
public MultiColumnQueryHits execute(org.apache.lucene.search.Query query,
org.apache.lucene.search.Sort sort,
long resultFetchHint,
Name selectorName)
throws IOException
- Executes the query and returns the hits that match the query.
- Parameters:
query - the query to execute.sort - the sort criteria.resultFetchHint - a hint on how many results should be fetched.selectorName - the single selector name for the query hits.
- Returns:
- the query hits.
- Throws:
IOException - if an error occurs while executing the query.
evaluate
public QueryHits evaluate(org.apache.lucene.search.Query query,
org.apache.lucene.search.Sort sort,
long resultFetchHint)
throws IOException
- Evaluates the query and returns the hits that match the query.
- Parameters:
query - the query to execute.sort - the sort criteria.resultFetchHint - a hint on how many results should be fetched.
- Returns:
- the query hits.
- Throws:
IOException - if an error occurs while executing the query.
docFreq
public int docFreq(org.apache.lucene.index.Term term)
throws IOException
- Specified by:
docFreq in interface org.apache.lucene.search.Searchable- Overrides:
docFreq in class org.apache.lucene.search.IndexSearcher
- Throws:
IOException
evaluate
public QueryHits evaluate(org.apache.lucene.search.Query query)
throws IOException
- Evaluates the query and returns the hits that match the query.
- Specified by:
evaluate in interface EvaluationContext
- Parameters:
query - the query to execute.
- Returns:
- the query hits.
- Throws:
IOException - if an error occurs while executing the query.
getSession
public SessionImpl getSession()
- Specified by:
getSession in interface EvaluationContext
- Returns:
- session that executes the query.
getItemStateManager
public ItemStateManager getItemStateManager()
- Specified by:
getItemStateManager in interface EvaluationContext
- Returns:
- the item state manager of the workspace.
Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.