public class QuickIndexer extends Object
Constructor and Description |
---|
QuickIndexer(org.apache.lucene.store.Directory index) |
Modifier and Type | Method and Description |
---|---|
void |
addDocument(org.apache.lucene.document.Document entry) |
void |
addDocumentFromFields(String[] names,
String[] values,
org.apache.lucene.document.FieldType[] type)
construct a document from names, values and types
|
void |
finalise()
call
IndexWriter.close() |
org.apache.lucene.analysis.standard.StandardAnalyzer |
getAnalyzer() |
org.apache.lucene.store.Directory |
getIndex() |
public QuickIndexer(org.apache.lucene.store.Directory index)
index
- construct a lucene index in this directorypublic void addDocument(org.apache.lucene.document.Document entry) throws org.apache.lucene.index.CorruptIndexException, IOException
entry
- document to indexorg.apache.lucene.index.CorruptIndexException
IOException
public void addDocumentFromFields(String[] names, String[] values, org.apache.lucene.document.FieldType[] type) throws org.apache.lucene.index.CorruptIndexException, IOException
names
- values
- type
- org.apache.lucene.index.CorruptIndexException
IOException
public void finalise() throws org.apache.lucene.index.CorruptIndexException, IOException
IndexWriter.close()
org.apache.lucene.index.CorruptIndexException
IOException
public org.apache.lucene.store.Directory getIndex()
Directory
public org.apache.lucene.analysis.standard.StandardAnalyzer getAnalyzer()
StandardAnalyzer