|
|||||||||||
| 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 | |
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
the Lucene index writer |
| Constructor Summary | |
FlatFileIndexWriter(org.apache.lucene.index.IndexWriter indexWriter)
|
|
| 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 |
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 - a 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.lang.Exception
files - an array of flat files to be indexedrelativeDirectories - directories containing the files such
that files[i] is located in relativeDirectories[i]
java.lang.Exception - if a problem occurspublic 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()
IndexWriterpublic 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 | ||||||||||