Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

recoinx.clef.irs.lucene
Class CLEFLuceneAdapter  view CLEFLuceneAdapter download CLEFLuceneAdapter.java

java.lang.Object
  extended byrecoin.group.ComponentWorker
      extended byrecoinx.clef.irs.lucene.CLEFLuceneAdapter
Direct Known Subclasses:
LuceneEnglishAdapter, LuceneFrenchAdapter, LuceneGermanAdapter, LuceneSpanishAdapter

public abstract class CLEFLuceneAdapter
extends recoin.group.ComponentWorker

Abstract super class for ComponentWorkers that use the Lucene search engine for retrieval.

This class provides attributes and methods to search the indexes of the Lucene search engine.

Version:
0.2.9

Nested Class Summary
protected  class CLEFLuceneAdapter.LuceneRunnable
          The LuceneRunnable class implements the special behavior to query the indexes.
 
Field Summary
protected  java.lang.String indexPath
          The path of the indexes.
(package private) static org.apache.log4j.Logger logger
          The logger for this class.
protected  boolean normalize
          Flag to signal whether any results should be normalized.
 org.apache.lucene.search.IndexSearcher searcher
          The IndexSearcher.
protected  float textWeight
          Specifies the weight that should be applied to the results found in the 'text' field of the collections.
protected  float titleWeight
          Specifies the weight that should be applied to the results found in the 'title' field of the collections.
 
Fields inherited from class recoin.group.ComponentWorker
component
 
Constructor Summary
CLEFLuceneAdapter()
          Creates a new CLEFLuceneAdapter.
 
Method Summary
protected  recoinx.clef.CLEFResultList executeQuery(java.lang.String indexPath, java.lang.String field, java.lang.String queryString, int index)
          Queries the Lucene index found at the specified path corresponding to the specified index using the specified query.
 void initiate(recoin.group.Component c)
          Initiates this CLEFLuceneAdapter by passing the specified Component to the superclass's initiate(Component) method and by initializing this class's attributes.
 
Methods inherited from class recoin.group.ComponentWorker
createComponentRunnable, createComponentRunnable, createComponentRunnable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static org.apache.log4j.Logger logger
The logger for this class.


searcher

public org.apache.lucene.search.IndexSearcher searcher
The IndexSearcher.


titleWeight

protected float titleWeight
Specifies the weight that should be applied to the results found in the 'title' field of the collections.

This parameter is overwritten if a an attribute with the same name exists in the repository for this Component. Default is '1.0'.


textWeight

protected float textWeight
Specifies the weight that should be applied to the results found in the 'text' field of the collections.

This parameter is overwritten if a an attribute with the same name exists in the repository for this Component. Default is '1.0'.


indexPath

protected java.lang.String indexPath
The path of the indexes.


normalize

protected boolean normalize
Flag to signal whether any results should be normalized.

This parameter is overwritten if a an attribute with the same name exists in the repository for this Component. Default is 'false'.

Constructor Detail

CLEFLuceneAdapter

public CLEFLuceneAdapter()
Creates a new CLEFLuceneAdapter.

Method Detail

initiate

public void initiate(recoin.group.Component c)
              throws recoin.exception.InitiationException
Initiates this CLEFLuceneAdapter by passing the specified Component to the superclass's initiate(Component) method and by initializing this class's attributes.


executeQuery

protected recoinx.clef.CLEFResultList executeQuery(java.lang.String indexPath,
                                                   java.lang.String field,
                                                   java.lang.String queryString,
                                                   int index)
Queries the Lucene index found at the specified path corresponding to the specified index using the specified query. The specified field determines the field of the indexed documents that should be searched.

The method creates a new CLEFResultList that has its attributes set to represent the collection the results were found in.