|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.indexer.dictionary.FieldStore
com.sun.labs.minion.indexer.dictionary.MemoryFieldStore
public class MemoryFieldStore
A field store to be used during indexing.
| Field Summary | |
|---|---|
protected int[] |
activeFields
A set of active fields. |
protected int |
currDoc
The ID of the current document that we're processing. |
protected Stack |
fieldStack
A stack of the fields that we're processing. |
protected boolean |
inDocument
Whether we're in a document. |
protected static java.lang.String |
logTag
The tag for this module. |
protected int |
nActive
The count of currently active fields. |
protected boolean |
shouldIndex
A boolean indicating whether words should be indexed or not. |
protected boolean |
shouldVector
A boolean indicating whether words should be added to the document vector or not. |
| Fields inherited from class com.sun.labs.minion.indexer.dictionary.FieldStore |
|---|
header, metaFile, savedFields |
| Constructor Summary | |
|---|---|
MemoryFieldStore(MetaFile f)
Constructs the field store for use. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the saved fields for the next indexing run. |
FieldInfo |
defineField(FieldInfo fi)
Defines a field, given a field information object. |
void |
dump(java.lang.String path,
java.io.RandomAccessFile dictFile,
PostingsOutput[] postOut)
Dump the field store to disk. |
void |
endDocument()
Ends the document. |
void |
endField()
Tells the field store that a field has ended. |
int[] |
getActiveFields()
Gets the active fields list. |
SavedField |
getSavedField(FieldInfo fi)
|
protected SavedField |
makeSavedField(FieldInfo fi)
Creates a saved field entry based on the type of the field. |
void |
saveData(FieldInfo cfi,
FieldInfo sfi,
ClassificationResult r)
|
void |
saveData(FieldInfo fi,
int docID,
java.lang.Object data)
|
void |
saveData(int docID,
java.lang.Object data)
Saves the given data in the current field. |
boolean |
shouldIndex()
A boolean indicating whether words should be indexed or not. |
boolean |
shouldVector()
Indicates whether a field should contribute tokens to the document vector. |
void |
startDocument(int docID)
Tells the field store that a new document has been started. |
int |
startField(FieldInfo f)
Tells the field store that a particular field has started. |
| Methods inherited from class com.sun.labs.minion.indexer.dictionary.FieldStore |
|---|
getFieldArray, getFieldID, getFieldInfo, getFieldInfo, getFieldName, getFieldType, getMultArray, getMultArray, getNFields, getVectoredFields, isSavedField |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int nActive
protected int[] activeFields
protected Stack fieldStack
protected int currDoc
protected boolean inDocument
protected boolean shouldIndex
protected boolean shouldVector
protected static java.lang.String logTag
| Constructor Detail |
|---|
public MemoryFieldStore(MetaFile f)
| Method Detail |
|---|
public FieldInfo defineField(FieldInfo fi)
fi - the information for the field that we want to define
public int[] getActiveFields()
public void startDocument(int docID)
public int startField(FieldInfo f)
f - The FieldInfo object for the field that is
starting.
public void saveData(int docID,
java.lang.Object data)
public void saveData(FieldInfo cfi,
FieldInfo sfi,
ClassificationResult r)
public void saveData(FieldInfo fi,
int docID,
java.lang.Object data)
public SavedField getSavedField(FieldInfo fi)
protected SavedField makeSavedField(FieldInfo fi)
public void endField()
public void endDocument()
public void dump(java.lang.String path,
java.io.RandomAccessFile dictFile,
PostingsOutput[] postOut)
throws java.io.IOException
path - The path to the directory where the field store will be
written.dictFile - The file to which the field dictionaries will be
written.postOut - The outputs to which the field postings will be
written.
java.io.IOException - if there is an error during writing.public void clear()
public boolean shouldIndex()
public boolean shouldVector()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||