org.apache.lucene.search
Class SearcherFactory

java.lang.Object
  extended by org.apache.lucene.search.SearcherFactory

public class SearcherFactory
extends Object

Factory class used by SearcherManager and NRTManager to create new IndexSearchers. The default implementation just creates an IndexSearcher with no custom behavior:

   public IndexSearcher newSearcher(IndexReader r) throws IOException {
     return new IndexSearcher(r);
   }
 
You can pass your own factory instead if you want custom behavior, such as:

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
SearcherFactory()
           
 
Method Summary
 IndexSearcher newSearcher(IndexReader reader)
          Returns a new IndexSearcher over the given reader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearcherFactory

public SearcherFactory()
Method Detail

newSearcher

public IndexSearcher newSearcher(IndexReader reader)
                          throws IOException
Returns a new IndexSearcher over the given reader.

Throws:
IOException