org.apache.jackrabbit.core.query.lucene
Class JackrabbitIndexSearcher

java.lang.Object
  extended by org.apache.lucene.search.Searcher
      extended by org.apache.lucene.search.IndexSearcher
          extended by org.apache.jackrabbit.core.query.lucene.JackrabbitIndexSearcher
All Implemented Interfaces:
Remote, org.apache.lucene.search.Searchable

public class JackrabbitIndexSearcher
extends org.apache.lucene.search.IndexSearcher

JackrabbitIndexSearcher implements an index searcher with jackrabbit specific optimizations.


Constructor Summary
JackrabbitIndexSearcher(SessionImpl s, org.apache.lucene.index.IndexReader r)
          Creates a new jackrabbit index searcher.
 
Method Summary
 QueryHits evaluate(org.apache.lucene.search.Query query, org.apache.lucene.search.Sort sort)
          Evaluates the query and returns the hits that match the query.
 MultiColumnQueryHits execute(org.apache.lucene.search.Query query, org.apache.lucene.search.Sort sort)
          Executes the query and returns the hits that match the query.
 
Methods inherited from class org.apache.lucene.search.IndexSearcher
close, doc, doc, docFreq, 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, setSimilarity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JackrabbitIndexSearcher

public JackrabbitIndexSearcher(SessionImpl s,
                               org.apache.lucene.index.IndexReader r)
Creates a new jackrabbit index searcher.

Parameters:
s - the session that executes the query.
r - the index reader.
Method Detail

execute

public MultiColumnQueryHits execute(org.apache.lucene.search.Query query,
                                    org.apache.lucene.search.Sort sort)
                             throws IOException
Executes the query and returns the hits that match the query.

Parameters:
query - the query to execute.
sort - the sort criteria.
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)
                   throws IOException
Evaluates the query and returns the hits that match the query.

Parameters:
query - the query to execute.
sort - the sort criteria.
Returns:
the query hits.
Throws:
IOException - if an error occurs while executing the query.


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