net.sf.zekr.engine.search.lucene
Class QuranTextIndexer

java.lang.Object
  extended by net.sf.zekr.engine.search.lucene.QuranTextIndexer
All Implemented Interfaces:
IIndexer

public class QuranTextIndexer
extends java.lang.Object
implements IIndexer

An abstract Quran text indexer. This class is capable of indexing subclasses of IQuranText. It's intended to index Quran text as well as translations.

Author:
Mohsen Saboorian

Field Summary
static java.lang.String CONTENTS_FIELD
           
static java.lang.String LOCATION_FIELD
           
 
Constructor Summary
QuranTextIndexer(IQuranText quranText, java.io.File indexDir, org.apache.lucene.analysis.Analyzer analyzer)
           
 
Method Summary
 void doIndex()
          Performs all the indexing process.
 void rollBack()
          Should be called when doIndex is not successful (when returned any exception).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCATION_FIELD

public static final java.lang.String LOCATION_FIELD
See Also:
Constant Field Values

CONTENTS_FIELD

public static final java.lang.String CONTENTS_FIELD
See Also:
Constant Field Values
Constructor Detail

QuranTextIndexer

public QuranTextIndexer(IQuranText quranText,
                        java.io.File indexDir,
                        org.apache.lucene.analysis.Analyzer analyzer)
Method Detail

doIndex

public void doIndex()
             throws IndexingException,
                    java.lang.InterruptedException
Description copied from interface: IIndexer
Performs all the indexing process.

Specified by:
doIndex in interface IIndexer
Throws:
IndexingException - if any exception occurred during indexing process
java.lang.InterruptedException - if indexing thread interrupted

rollBack

public void rollBack()
Should be called when doIndex is not successful (when returned any exception).