org.apache.cocoon.components.search
Class SimpleLuceneCocoonIndexerImpl

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLoggable
        |
        +--org.apache.cocoon.components.search.SimpleLuceneCocoonIndexerImpl
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.logger.Loggable, LuceneCocoonIndexer

public class SimpleLuceneCocoonIndexerImpl
extends org.apache.avalon.framework.logger.AbstractLoggable
implements LuceneCocoonIndexer, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.activity.Disposable

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.

Version:
CVS $Id: SimpleLuceneCocoonIndexerImpl.java,v 1.6.2.1 2002/04/18 12:56:41 vgritsenko Exp $
Author:
Bernhard Huber

Field Summary
static java.lang.String ANALYZER_CLASSNAME_CONFIG
          Description of the Field
static java.lang.String ANALYZER_CLASSNAME_DEFAULT
          Description of the Field
static java.lang.String DIRECTORY_CONFIG
          Description of the Field
static java.lang.String DIRECTORY_DEFAULT
          Description of the Field
protected  org.apache.avalon.framework.component.ComponentManager manager
          The component manager instance
static java.lang.String MERGE_FACTOR_CONFIG
          Description of the Field
static int MERGE_FACTOR_DEFAULT
          http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg00373.html
 
Fields inherited from interface org.apache.cocoon.components.search.LuceneCocoonIndexer
ROLE
 
Constructor Summary
SimpleLuceneCocoonIndexerImpl()
           
 
Method Summary
 void compose(org.apache.avalon.framework.component.ComponentManager manager)
          Set the current ComponentManager instance used by this Composable.
 void configure(org.apache.avalon.framework.configuration.Configuration conf)
          Description of the Method
 void dispose()
          Description of the Method
 void index(org.apache.lucene.store.Directory index, boolean create, java.net.URL base_url)
          index content of base_url, index content of links from base_url.
 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.AbstractLoggable
getLogger, setLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANALYZER_CLASSNAME_CONFIG

public static final java.lang.String ANALYZER_CLASSNAME_CONFIG
Description of the Field
Since:
 

ANALYZER_CLASSNAME_DEFAULT

public static final java.lang.String ANALYZER_CLASSNAME_DEFAULT
Description of the Field
Since:
 

DIRECTORY_CONFIG

public static final java.lang.String DIRECTORY_CONFIG
Description of the Field
Since:
 

DIRECTORY_DEFAULT

public static final java.lang.String DIRECTORY_DEFAULT
Description of the Field
Since:
 

MERGE_FACTOR_CONFIG

public static final java.lang.String MERGE_FACTOR_CONFIG
Description of the Field
Since:
 

MERGE_FACTOR_DEFAULT

public static final int MERGE_FACTOR_DEFAULT
http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg00373.html

manager

protected org.apache.avalon.framework.component.ComponentManager manager
The component manager instance
Since:
 
Constructor Detail

SimpleLuceneCocoonIndexerImpl

public SimpleLuceneCocoonIndexerImpl()
Method Detail

setAnalyzer

public void setAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
Sets the analyzer attribute of the SimpleLuceneCocoonIndexerImpl object
Specified by:
setAnalyzer in interface LuceneCocoonIndexer
Parameters:
analyzer - The new analyzer value
Since:
 

configure

public void configure(org.apache.avalon.framework.configuration.Configuration conf)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Description of the Method
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Parameters:
conf - Description of Parameter
Throws:
org.apache.avalon.framework.configuration.ConfigurationException - Description of Exception
Since:
 

compose

public void compose(org.apache.avalon.framework.component.ComponentManager manager)
             throws org.apache.avalon.framework.component.ComponentException
Set the current ComponentManager instance used by this Composable.
Specified by:
compose in interface org.apache.avalon.framework.component.Composable
Parameters:
manager - Description of Parameter
Throws:
org.apache.avalon.framework.component.ComponentException - Description of Exception
Since:
 

dispose

public void dispose()
Description of the Method
Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable
Since:
 

index

public void index(org.apache.lucene.store.Directory index,
                  boolean create,
                  java.net.URL base_url)
           throws ProcessingException
index content of base_url, index content of links from base_url.
Specified by:
index in interface LuceneCocoonIndexer
Parameters:
index - the lucene store to write the index to
create - iff true create, or overwrite existing index, else update existing index.
base_url - index content of base_url, and crawl through all its links recursivly.
Throws:
ProcessingException - Description of Exception
Since:
 


Copyright � 1999-2002 Apache Software Foundation. All Rights Reserved.