|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lenya.lucene.index.AbstractIndexer
public abstract class AbstractIndexer
Abstract base class for indexers.
The factory method #getDocumentCreator(String[])
is used to create a
DocumentCreator from the command-line arguments.
Nested Class Summary | |
---|---|
class |
AbstractIndexer.CreateIndexHandler
DOCUMENT ME! |
static class |
AbstractIndexer.DefaultIndexFilter
FileFilter used to obtain the files to index. |
static class |
AbstractIndexer.DeleteHandler
Deletes all stale documents up to the document representing the next file. |
class |
AbstractIndexer.IndexHandler
DOCUMENT ME! |
class |
AbstractIndexer.UpdateIndexHandler
DOCUMENT ME! |
Constructor Summary | |
---|---|
AbstractIndexer()
Creates a new instance of AbstractIndexer |
Method Summary | |
---|---|
void |
configure(org.w3c.dom.Element indexer,
java.lang.String configFileName)
Initializes this indexer with command-line parameters. |
abstract DocumentCreator |
createDocumentCreator(org.w3c.dom.Element indexer,
java.lang.String configFileName)
DOCUMENT ME! |
void |
createIndex(java.io.File dumpDirectory,
java.io.File index)
Creates a new index. |
protected void |
deleteStaleDocuments(java.io.File dumpDirectory,
java.io.File index)
Delete the stale documents. |
void |
doIndex(java.io.File dumpDirectory,
java.io.File index,
boolean create)
Index files |
protected DocumentCreator |
getDocumentCreator()
Returns the DocumentCreator of this indexer. |
java.io.FileFilter |
getFilter(org.w3c.dom.Element indexer,
java.lang.String configFileName)
Returns the filter used to receive the indexable files. |
void |
indexDocument(java.io.File file)
Updates the index re one document old documents to be deleted unchanged documents, to be left alone, or new documents, to be indexed. |
void |
updateIndex(java.io.File dumpDirectory,
java.io.File index)
Updates the index incrementally. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractIndexer()
Method Detail |
---|
protected DocumentCreator getDocumentCreator()
public void configure(org.w3c.dom.Element indexer, java.lang.String configFileName) throws java.lang.Exception
configure
in interface Indexer
java.lang.Exception
public abstract DocumentCreator createDocumentCreator(org.w3c.dom.Element indexer, java.lang.String configFileName) throws java.lang.Exception
element
- DOCUMENT ME!
java.lang.Exception
- DOCUMENT ME!public void updateIndex(java.io.File dumpDirectory, java.io.File index) throws java.lang.Exception
updateIndex
in interface Indexer
java.lang.Exception
public void indexDocument(java.io.File file) throws java.lang.Exception
indexDocument
in interface Indexer
java.lang.Exception
public void createIndex(java.io.File dumpDirectory, java.io.File index) throws java.lang.Exception
createIndex
in interface Indexer
java.lang.Exception
public void doIndex(java.io.File dumpDirectory, java.io.File index, boolean create)
dumpDirectory
- Directory where the files to be indexed are locatedindex
- Directory where the index shall be locatedcreate
- true means the index will be created from scratch, false means it will be indexed incrementallyprotected void deleteStaleDocuments(java.io.File dumpDirectory, java.io.File index) throws java.lang.Exception
java.lang.Exception
public java.io.FileFilter getFilter(org.w3c.dom.Element indexer, java.lang.String configFileName)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |