|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.labs.minion.indexer.dictionary.FieldStore
public class FieldStore
A common base class for MemoryFieldStore
and
DiskFieldStore
.
Field Summary | |
---|---|
protected static java.lang.String |
header
The header for the old-style field store. |
protected static java.lang.String |
logTag
The log tag. |
protected MetaFile |
metaFile
The meta file. |
protected SavedField[] |
savedFields
The saved fields. |
Constructor Summary | |
---|---|
FieldStore()
|
Method Summary | |
---|---|
int[] |
getFieldArray(java.lang.String[] fieldNames)
Gets an array of field IDs suitable for use in postings entry iterators. |
int |
getFieldID(FieldInfo f)
Gets the ID for a given field info object. |
FieldInfo |
getFieldInfo(java.lang.String name)
Gets the info for a given field name. |
protected FieldInfo |
getFieldInfo(java.lang.String name,
java.util.EnumSet<FieldInfo.Attribute> attributes,
FieldInfo.Type type)
Gets the info for a given field name. |
java.lang.String |
getFieldName(int id)
Gets the name associated with a field ID. |
FieldInfo.Type |
getFieldType(java.lang.String name)
Gets the type of a saved field. |
float[] |
getMultArray(java.util.Map mult)
Gets an array for field multipliers suitable for use in postings iterators. |
float[] |
getMultArray(java.lang.String[] fieldNames,
float[] mult)
Gets an array of field multipliers suitable for use in postings entry iterators. |
int |
getNFields()
Gets the number of currently defined fields. |
int[] |
getVectoredFields()
Gets an array of the vectored fields. |
boolean |
isSavedField(java.lang.String name)
Determines whether a given field name is a saved field or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected MetaFile metaFile
protected SavedField[] savedFields
protected static java.lang.String logTag
protected static java.lang.String header
Constructor Detail |
---|
public FieldStore()
Method Detail |
---|
public FieldInfo getFieldInfo(java.lang.String name)
name
- the field name.
null
if there
is no such field.protected FieldInfo getFieldInfo(java.lang.String name, java.util.EnumSet<FieldInfo.Attribute> attributes, FieldInfo.Type type)
name
- the field name.attributes
- The field attributes.type
- the field type.
null
if
there was some problem with the meta file.public int getNFields()
public int getFieldID(FieldInfo f)
f
- The FieldInfo
object.public java.lang.String getFieldName(int id)
id
- The field ID of interest.
public FieldInfo.Type getFieldType(java.lang.String name)
name
- the name of the field for which we want the type
public int[] getFieldArray(java.lang.String[] fieldNames)
fieldNames
- The names of the fields that we're interested in.
If null
is given as a field value, then words that
don't occur in any field are what we're interested in.
null
if
the given array of field names is null.public float[] getMultArray(java.lang.String[] fieldNames, float[] mult)
fieldNames
- The names of the fields that we're interested in.
If a null
field name is passed, that multiplier will be
used for occurrences that are not in any field.mult
- The multipliers for the named fields, in the order that
the fields are given in.
public float[] getMultArray(java.util.Map mult)
public boolean isSavedField(java.lang.String name)
public int[] getVectoredFields()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |