Class JackrabbitIndexSearcher

  • All Implemented Interfaces:
    Closeable, AutoCloseable, 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.
    • Field Summary

      • Fields inherited from class org.apache.lucene.search.IndexSearcher

        docStarts, subReaders, subSearchers
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int docFreq​(org.apache.lucene.index.Term term)  
      QueryHits evaluate​(org.apache.lucene.search.Query query)
      Evaluates the query and returns the hits that match the query.
      QueryHits evaluate​(org.apache.lucene.search.Query query, org.apache.lucene.search.Sort sort, long resultFetchHint)
      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, long resultFetchHint, Name selectorName)
      Executes the query and returns the hits that match the query.
      ItemStateManager getItemStateManager()  
      SessionImpl getSession()  
      • Methods inherited from class org.apache.lucene.search.IndexSearcher

        close, createNormalizedWeight, doc, doc, explain, explain, gatherSubReaders, getIndexReader, getSimilarity, getSubReaders, maxDoc, rewrite, search, search, search, search, search, search, search, search, search, search, search, searchAfter, searchAfter, setDefaultFieldSortScoring, setSimilarity, toString
      • Methods inherited from class org.apache.lucene.search.Searcher

        createWeight, docFreqs
    • Constructor Detail

      • 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.
    • Method Detail

      • 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.