org.outerj.daisy.ftindex
Class FullTextIndexImpl

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.outerj.daisy.ftindex.FullTextIndexImpl
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, FullTextIndex, FullTextIndexImplMBean, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable

public class FullTextIndexImpl
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements FullTextIndex, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.configuration.Configurable, FullTextIndexImplMBean


Nested Class Summary
 class FullTextIndexImpl.IndexOptimizeThread
           
 
Constructor Summary
FullTextIndexImpl()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
 java.lang.String getIndexerStatus()
           
 boolean getIndexExists()
           
 void index(long documentId, long branchId, long languageId, java.lang.String documentName, java.lang.String content, java.lang.String fields)
          Index the given content for the given document variant.
 void initialize()
           
 java.lang.String optimizeIndex()
           
 Hits search(java.lang.String queryAsString, long branchId, long languageId, boolean searchName, boolean searchContent, boolean searchFields)
           
 void service(org.apache.avalon.framework.service.ServiceManager serviceManager)
           
 
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
 

Constructor Detail

FullTextIndexImpl

public FullTextIndexImpl()
Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               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

initialize

public void initialize()
                throws java.lang.Exception
Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.Exception

service

public void service(org.apache.avalon.framework.service.ServiceManager serviceManager)
             throws org.apache.avalon.framework.service.ServiceException
Specified by:
service in interface org.apache.avalon.framework.service.Serviceable
Throws:
org.apache.avalon.framework.service.ServiceException

search

public Hits search(java.lang.String queryAsString,
                   long branchId,
                   long languageId,
                   boolean searchName,
                   boolean searchContent,
                   boolean searchFields)
            throws org.outerj.daisy.repository.query.QueryException
Specified by:
search in interface FullTextIndex
Throws:
org.outerj.daisy.repository.query.QueryException

index

public void index(long documentId,
                  long branchId,
                  long languageId,
                  java.lang.String documentName,
                  java.lang.String content,
                  java.lang.String fields)
           throws java.lang.Exception
Description copied from interface: FullTextIndex
Index the given content for the given document variant. This will first delete any previous indexed content for that document variant, and then index the new content.

The parameters documentName, content and fields are all optional (can all be null), if they are all null then the index for this document will just be deleted.

Specified by:
index in interface FullTextIndex
Throws:
java.lang.Exception

optimizeIndex

public java.lang.String optimizeIndex()
Specified by:
optimizeIndex in interface FullTextIndexImplMBean

getIndexExists

public boolean getIndexExists()
Specified by:
getIndexExists in interface FullTextIndexImplMBean

getIndexerStatus

public java.lang.String getIndexerStatus()
Specified by:
getIndexerStatus in interface FullTextIndexImplMBean


Copyright © -2005 . All Rights Reserved.