|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.mtzky.lucene.LuceneIndex<E>
E - entitypublic class LuceneIndex<E>
| 入れ子のクラスの概要 | |
|---|---|
static interface |
LuceneIndex.WriterCallback<E>
|
| コンストラクタの概要 | |
|---|---|
LuceneIndex(LuceneDocumentDesc<E> desc)
Creates instance with RAMDirectory. |
|
LuceneIndex(LuceneDocumentDesc<E> desc,
Directory dir)
Creates instance with the specified directory. |
|
| メソッドの概要 | |
|---|---|
void |
close()
|
protected LuceneIndexSearcher<E> |
createSearcher()
|
Directory |
getDirectory()
|
LuceneIndexSearcher<E> |
getSearcher()
Requires IndexSearcher.close(). |
LuceneIndexWriter<E> |
getWriter()
Requires IndexWriter.close(). |
boolean |
isClosed()
|
void |
setDirectory(Directory directory)
Switches new Directory from current Directory. |
void |
withWriter(LuceneIndex.WriterCallback<E> callback)
Creates a new IndexWriter for this current Directory,
passes it to the callback, and ensures the IndexWriter is
closed after the callback returns. |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public LuceneIndex(LuceneDocumentDesc<E> desc)
throws CorruptIndexException,
IOException
Creates instance with RAMDirectory.
desc -
IOException
CorruptIndexExceptionLuceneIndex(LuceneDocumentDesc, Directory)
public LuceneIndex(LuceneDocumentDesc<E> desc,
Directory dir)
throws CorruptIndexException,
IOException
Creates instance with the specified directory.
desc - dir -
IOException
CorruptIndexException| メソッドの詳細 |
|---|
public Directory getDirectory()
Directory
public void setDirectory(Directory directory)
throws CorruptIndexException,
IOException
Switches new Directory from current Directory.
directory - new Directory to switch from current Directory
IOException
CorruptIndexException
public LuceneIndexWriter<E> getWriter()
throws CorruptIndexException,
LockObtainFailedException,
IOException
Requires IndexWriter.close().
IndexWriter of a current Directory
CorruptIndexException
LockObtainFailedException
IOException
public void withWriter(LuceneIndex.WriterCallback<E> callback)
throws CorruptIndexException,
LockObtainFailedException,
IOException
Creates a new IndexWriter for this current Directory,
passes it to the callback, and ensures the IndexWriter is
closed after the callback returns.
callback - LuceneIndex.WriterCallback
CorruptIndexException
LockObtainFailedException
IOExceptiongetWriter(),
LuceneIndex.WriterCallback
public LuceneIndexSearcher<E> getSearcher()
throws CorruptIndexException,
IOException
Requires IndexSearcher.close().
IndexSearcher of a current Directory
CorruptIndexException
IOException
protected LuceneIndexSearcher<E> createSearcher()
throws CorruptIndexException,
IOException
IndexSearcher
CorruptIndexException
IOExceptiongetSearcher(),
getDirectory()public boolean isClosed()
Closable 内の isClosed
public void close()
throws IOException
Closeable 内の closeIOException
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||