|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.components.search.SimpleLuceneCocoonIndexerImpl
public class SimpleLuceneCocoonIndexerImpl
A lucene indexer.
XML documents are indexed using lucene. Links to XML documents are supplied by a crawler, requesting links of documents by specifying a cocoon-view, and HTTP protocol.
Field Summary | |
---|---|
protected org.apache.lucene.analysis.Analyzer |
analyzer
The used lucene analyzer |
static String |
ANALYZER_CLASSNAME_CONFIG
configuration tagname for specifying the analyzer class |
static String |
ANALYZER_CLASSNAME_DEFAULT
configuration default analyzer class |
static String |
DIRECTORY_CONFIG
configuration tagname for specifying lucene's index directory |
static String |
DIRECTORY_DEFAULT
configuration default directory, ie. no default. |
protected ServiceManager |
manager
The service manager for looking up components used. |
static String |
MERGE_FACTOR_CONFIG
configuration tagname for specifying lucene's merge factor. |
static int |
MERGE_FACTOR_DEFAULT
configuration default value for lucene's merge factor. |
Fields inherited from interface org.apache.cocoon.components.search.LuceneCocoonIndexer |
---|
ROLE |
Constructor Summary | |
---|---|
SimpleLuceneCocoonIndexerImpl()
|
Method Summary | |
---|---|
void |
configure(Configuration conf)
Configure this component. |
void |
dispose()
Dispose this component. |
void |
index(org.apache.lucene.store.Directory index,
boolean create,
URL base_url)
index content of base_url, index content of links from base_url. |
void |
service(ServiceManager manager)
Set the current ServiceManager instance used by this
Serviceable . |
void |
setAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
Sets the analyzer attribute of the SimpleLuceneCocoonIndexerImpl object |
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 |
Field Detail |
---|
public static final String ANALYZER_CLASSNAME_CONFIG
public static final String ANALYZER_CLASSNAME_DEFAULT
public static final String DIRECTORY_CONFIG
public static final String DIRECTORY_DEFAULT
public static final String MERGE_FACTOR_CONFIG
public static final int MERGE_FACTOR_DEFAULT
protected ServiceManager manager
protected org.apache.lucene.analysis.Analyzer analyzer
Constructor Detail |
---|
public SimpleLuceneCocoonIndexerImpl()
Method Detail |
---|
public void setAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
setAnalyzer
in interface LuceneCocoonIndexer
analyzer
- The new analyzer valuepublic void configure(Configuration conf) throws ConfigurationException
configure
in interface Configurable
conf
- is the configuration
ConfigurationException
- is thrown if configuring failspublic void service(ServiceManager manager) throws ServiceException
ServiceManager
instance used by this
Serviceable
.
service
in interface Serviceable
manager
- used by this component
ServiceException
- is never thrownpublic void dispose()
dispose
in interface Disposable
public void index(org.apache.lucene.store.Directory index, boolean create, URL base_url) throws ProcessingException
index
in interface LuceneCocoonIndexer
index
- the lucene store to write the index tocreate
- if true create, or overwrite existing index, else update
existing index.base_url
- index content of base_url, and crawl through all its links
recursivly.
ProcessingException
- is thrown if indexing fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |