org.compass.core.lucene.engine
Class LuceneSearchEngineInternalSearch

java.lang.Object
  extended by org.compass.core.lucene.engine.LuceneSearchEngineInternalSearch
All Implemented Interfaces:
SearchEngineInternalSearch, LuceneDelegatedClose

public class LuceneSearchEngineInternalSearch
extends Object
implements SearchEngineInternalSearch, LuceneDelegatedClose

A Lucene specific search "internals", allowing for Lucene IndexReader and Searcher access.

Author:
kimchy

Constructor Summary
LuceneSearchEngineInternalSearch(LuceneSearchEngine searchEngine, IndexReader indexReader, Searcher searcher, List<LuceneIndexHolder> indexHolders)
          Creates a new instance, with a searcher and index holders which will be used to release when calling close.
LuceneSearchEngineInternalSearch(LuceneSearchEngine searchEngine, List<LuceneIndexHolder> indexHolders)
           
LuceneSearchEngineInternalSearch(LuceneSearchEngine searchEngine, LuceneIndexHolder indexHolder, List<LuceneIndexHolder> indexHolders)
           
LuceneSearchEngineInternalSearch(LuceneSearchEngine searchEngine, MultiSearcher searcher, List<LuceneIndexHolder> indexHolders)
           
 
Method Summary
 void close()
          Closes the internal search.
 void closeDelegate()
          [Intenral]: Closes without removing the delegate.
 IndexReader getReader()
          Returns a Lucene IndexReader.
 Searcher getSearcher()
          Returns a Lucene Searcher.
 boolean isEmpty()
          Returns true if it represents an empty index scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneSearchEngineInternalSearch

public LuceneSearchEngineInternalSearch(LuceneSearchEngine searchEngine,
                                        List<LuceneIndexHolder> indexHolders)

LuceneSearchEngineInternalSearch

public LuceneSearchEngineInternalSearch(LuceneSearchEngine searchEngine,
                                        MultiSearcher searcher,
                                        List<LuceneIndexHolder> indexHolders)

LuceneSearchEngineInternalSearch

public LuceneSearchEngineInternalSearch(LuceneSearchEngine searchEngine,
                                        LuceneIndexHolder indexHolder,
                                        List<LuceneIndexHolder> indexHolders)

LuceneSearchEngineInternalSearch

public LuceneSearchEngineInternalSearch(LuceneSearchEngine searchEngine,
                                        IndexReader indexReader,
                                        Searcher searcher,
                                        List<LuceneIndexHolder> indexHolders)
Creates a new instance, with a searcher and index holders which will be used to release when calling close.

Method Detail

isEmpty

public boolean isEmpty()
Returns true if it represents an empty index scope.


getSearcher

public Searcher getSearcher()
Returns a Lucene Searcher.


getReader

public IndexReader getReader()
                      throws SearchEngineException
Returns a Lucene IndexReader.

Throws:
SearchEngineException

closeDelegate

public void closeDelegate()
                   throws SearchEngineException
[Intenral]: Closes without removing the delegate.

Specified by:
closeDelegate in interface LuceneDelegatedClose
Throws:
SearchEngineException

close

public void close()
           throws SearchEngineException
Closes the internal search. Note, does not require to be called here since will automatically be called on transaction commit / rollback.

Throws:
SearchEngineException


Copyright (c) 2004-2009 The Compass Project.