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

Field Summary
protected  IndexReader indexReader
           
 
Constructor Summary
LuceneSearchEngineInternalSearch()
           
LuceneSearchEngineInternalSearch(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(LuceneIndexHolder indexHolder, List<LuceneIndexHolder> indexHolders)
           
LuceneSearchEngineInternalSearch(MultiSearcher searcher, List<LuceneIndexHolder> indexHolders)
           
 
Method Summary
 void close()
          Closes this instance of Lucene search "internals".
 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
 

Field Detail

indexReader

protected IndexReader indexReader
Constructor Detail

LuceneSearchEngineInternalSearch

public LuceneSearchEngineInternalSearch()

LuceneSearchEngineInternalSearch

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

LuceneSearchEngineInternalSearch

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

LuceneSearchEngineInternalSearch

public LuceneSearchEngineInternalSearch(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

close

public void close()
           throws SearchEngineException
Closes this instance of Lucene search "internals". This is an optional operation since Compass will take care of closing it when commit/rollback is called on the transaction.

Specified by:
close in interface LuceneDelegatedClose
Throws:
SearchEngineException


Copyright (c) 2004-2008 The Compass Project.