| Modifier and Type | Field and Description |
|---|---|
protected org.apache.lucene.index.IndexWriter |
writer |
| Constructor and Description |
|---|
LuceneIndexer(org.apache.lucene.index.IndexWriter writer)
INTERNAL: Creates an indexer instance that will store its index in
the given lucene directory and use the specified token stream
analyzer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
INTERNAL: Closes the indexer.
|
void |
delete()
INTERNAL: Deletes the index.
|
void |
delete(String field,
String value)
INTERNAL: Removes all documents with the specified field value from
the index.
|
void |
flush()
INTERNAL: Flushes all changes done to the index.
|
int |
getDocs()
INTERNAL: Returns the number of documents stored in the index.
|
protected org.apache.lucene.document.Document |
getDocument(DocumentIF document) |
protected org.apache.lucene.document.Field |
getField(FieldIF field) |
protected org.apache.lucene.document.FieldType |
getFieldType(FieldIF field) |
protected String |
getStringValue(Reader reader) |
void |
index(DocumentIF document)
INTERNAL: Indexes the specified document.
|
public LuceneIndexer(org.apache.lucene.index.IndexWriter writer)
public int getDocs()
throws IOException
IOExceptionpublic void index(DocumentIF document) throws IOException
IndexerIFindex in interface IndexerIFIOExceptionpublic void delete(String field, String value) throws IOException
IndexerIFdelete in interface IndexerIFIOExceptionpublic void flush()
throws IOException
IndexerIFflush in interface IndexerIFIOExceptionpublic void delete()
throws IOException
IndexerIFdelete in interface IndexerIFIOExceptionpublic void close()
throws IOException
IndexerIFclose in interface IndexerIFIOExceptionprotected org.apache.lucene.document.Document getDocument(DocumentIF document) throws IOException
IOExceptionprotected org.apache.lucene.document.Field getField(FieldIF field) throws IOException
IOExceptionprotected org.apache.lucene.document.FieldType getFieldType(FieldIF field)
protected String getStringValue(Reader reader) throws IOException
IOException