org.apache.cocoon.components.search.components.impl
Class DefaultIndexerImpl
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.components.search.components.impl.AbstractIndexer
org.apache.cocoon.components.search.components.impl.DefaultIndexerImpl
- All Implemented Interfaces:
- org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, Indexer
public class DefaultIndexerImpl
- extends AbstractIndexer
- implements org.apache.avalon.framework.configuration.Configurable
- Author:
- Nicolas Maisonneuve
Method Summary |
protected void |
addDocument(org.apache.lucene.document.Document doc)
|
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
|
protected void |
release()
releasing resources |
void |
setBufferSize(int value)
Set the maximum number of buffered documents to avoid to open and close
the IndexWriter a lot of times |
protected void |
updateDocument(org.apache.lucene.document.Document doc)
|
Methods inherited from class org.apache.cocoon.components.search.components.impl.AbstractIndexer |
addDocument, clearIndex, closeReader, closeWriter, del, deleteDocument, getAnalyzer, getIndex, getMergeFactor, index, openIndexReader, openIndexWriter, optimize, recycle, setAnalyzer, setIndex, setMergeFactor, switchToADD_MODE, switchToDEL_MODE |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DOCUMENT_BUFFERED_NUM_ELEMENT
public static final java.lang.String DOCUMENT_BUFFERED_NUM_ELEMENT
- Buffer size is element
- See Also:
- Constant Field Values
DefaultIndexerImpl
public DefaultIndexerImpl()
configure
public void configure(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Specified by:
configure
in interface org.apache.avalon.framework.configuration.Configurable
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
setBufferSize
public void setBufferSize(int value)
- Set the maximum number of buffered documents to avoid to open and close
the IndexWriter a lot of times
- Parameters:
value
- int number (default 100)
release
protected final void release()
throws IndexException
- Description copied from class:
AbstractIndexer
- releasing resources
- Overrides:
release
in class AbstractIndexer
- Throws:
IndexException
addDocument
protected final void addDocument(org.apache.lucene.document.Document doc)
throws IndexException
- Specified by:
addDocument
in class AbstractIndexer
- Throws:
IndexException
updateDocument
protected final void updateDocument(org.apache.lucene.document.Document doc)
throws IndexException
- Specified by:
updateDocument
in class AbstractIndexer
- Throws:
IndexException
Copyright © $ Apache Software Foundation. All Rights Reserved.