|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.activity.indexedfiles.FlatFileIndexWriter
Implemented by classes that index flat files.
indexFiles
indexes an array of text files.indexFiles()
the caller must setup the fields to be indexed with setFields()
.Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE Copyright statement |
static java.lang.String |
DATA_FILE_NAME Internal index field containing the name and location of a data file. |
static java.lang.String |
DATA_LENGTH Internal index field for storing the length of a record within a data file. |
static java.lang.String |
DATA_OFFSET Internal index field for storing the offset of a record within a data file. |
protected org.apache.lucene.index.IndexWriter |
mIndexWriter Lucene index writer |
Constructor Summary | |
FlatFileIndexWriter(org.apache.lucene.index.IndexWriter indexWriter) Constructor. |
Method Summary | |
abstract java.lang.String[] |
getFields() Gets the indexed fields. |
org.apache.lucene.index.IndexWriter |
getIndexWriter() Gets the index writer. |
abstract void |
indexFiles(java.io.File[] files, java.lang.String[] relativeDirectories) Indexes an array of flat files. |
abstract void |
setFields(java.lang.String[] fields) Sets the fields for indexing |
void |
setIndexWriter(org.apache.lucene.index.IndexWriter indexwriter) Sets the index writer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
public static final java.lang.String DATA_FILE_NAME
public static final java.lang.String DATA_OFFSET
public static final java.lang.String DATA_LENGTH
protected org.apache.lucene.index.IndexWriter mIndexWriter
Constructor Detail |
public FlatFileIndexWriter(org.apache.lucene.index.IndexWriter indexWriter)
indexWriter
- org.apache.lucene.index.IndexWriter
which is open and ready for writing.Method Detail |
public abstract void indexFiles(java.io.File[] files, java.lang.String[] relativeDirectories) throws java.io.FileNotFoundException, java.io.IOException
files
- An array of flat files to be indexedrelativeDirectories
- Directories containing the files such that files[i]
is located in relativeDirectories[i]
.java.io.FileNotFoundException
- If any file is not found.java.io.IOException
- If there is a problem encountered when indexing a file.public abstract java.lang.String[] getFields()
public abstract void setFields(java.lang.String[] fields)
fields
- The fields that are being indexed.public org.apache.lucene.index.IndexWriter getIndexWriter()
IndexWriter
public void setIndexWriter(org.apache.lucene.index.IndexWriter indexwriter)
indexwriter
- The IndexWriter
to be used for indexing.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |