| java.lang.Object org.apache.lucene.index.FieldInfos
FieldInfos | final class FieldInfos (Code) | | Access to the Fieldable Info file that describes document fields and whether or
not they are indexed. Each segment has a separate Fieldable Info file. Objects
of this class are thread-safe for multiple readers, but only one thread can
be adding documents at a time, with no other reader or writer threads
accessing this object.
|
Method Summary | |
public void | add(Document doc) Adds field info for a Document. | public void | add(Collection names, boolean isIndexed) Assumes the fields are not storing term vectors. | public void | add(String name, boolean isIndexed) Calls 5 parameter add with false for all TermVector parameters. | public void | add(String name, boolean isIndexed, boolean storeTermVector) Calls 5 parameter add with false for term vector positions and offsets. | public void | add(String name, boolean isIndexed, boolean storeTermVector, boolean storePositionWithTermVector, boolean storeOffsetWithTermVector) If the field is not yet known, adds it. | public void | add(String name, boolean isIndexed, boolean storeTermVector, boolean storePositionWithTermVector, boolean storeOffsetWithTermVector, boolean omitNorms) If the field is not yet known, adds it. | public FieldInfo | add(String name, boolean isIndexed, boolean storeTermVector, boolean storePositionWithTermVector, boolean storeOffsetWithTermVector, boolean omitNorms, boolean storePayloads) If the field is not yet known, adds it. | public void | addIndexed(Collection names, boolean storeTermVectors, boolean storePositionWithTermVector, boolean storeOffsetWithTermVector) Add fields that are indexed. | public Object | clone() Returns a deep clone of this FieldInfos instance. | public FieldInfo | fieldInfo(String fieldName) | public FieldInfo | fieldInfo(int fieldNumber) Return the fieldinfo object referenced by the fieldNumber. | public String | fieldName(int fieldNumber) Return the fieldName identified by its number. | public int | fieldNumber(String fieldName) | public boolean | hasVectors() | public int | size() | public void | write(Directory d, String name) | public void | write(IndexOutput output) |
IS_INDEXED | final static byte IS_INDEXED(Code) | | |
OMIT_NORMS | final static byte OMIT_NORMS(Code) | | |
STORE_OFFSET_WITH_TERMVECTOR | final static byte STORE_OFFSET_WITH_TERMVECTOR(Code) | | |
STORE_PAYLOADS | final static byte STORE_PAYLOADS(Code) | | |
STORE_POSITIONS_WITH_TERMVECTOR | final static byte STORE_POSITIONS_WITH_TERMVECTOR(Code) | | |
STORE_TERMVECTOR | final static byte STORE_TERMVECTOR(Code) | | |
FieldInfos | FieldInfos(Directory d, String name) throws IOException(Code) | | Construct a FieldInfos object using the directory and the name of the file
IndexInput
Parameters: d - The directory to open the IndexInput from Parameters: name - The name of the file to open the IndexInput from in the Directory throws: IOException - |
add | public void add(Document doc)(Code) | | Adds field info for a Document.
|
add | public void add(Collection names, boolean isIndexed)(Code) | | Assumes the fields are not storing term vectors.
Parameters: names - The names of the fields Parameters: isIndexed - Whether the fields are indexed or not See Also: FieldInfos.add(String,boolean) |
add | public void add(String name, boolean isIndexed, boolean storeTermVector)(Code) | | Calls 5 parameter add with false for term vector positions and offsets.
Parameters: name - The name of the field Parameters: isIndexed - true if the field is indexed Parameters: storeTermVector - true if the term vector should be stored |
add | public void add(String name, boolean isIndexed, boolean storeTermVector, boolean storePositionWithTermVector, boolean storeOffsetWithTermVector)(Code) | | If the field is not yet known, adds it. If it is known, checks to make
sure that the isIndexed flag is the same as was given previously for this
field. If not - marks it as being indexed. Same goes for the TermVector
parameters.
Parameters: name - The name of the field Parameters: isIndexed - true if the field is indexed Parameters: storeTermVector - true if the term vector should be stored Parameters: storePositionWithTermVector - true if the term vector with positions should be stored Parameters: storeOffsetWithTermVector - true if the term vector with offsets should be stored |
add | public void add(String name, boolean isIndexed, boolean storeTermVector, boolean storePositionWithTermVector, boolean storeOffsetWithTermVector, boolean omitNorms)(Code) | | If the field is not yet known, adds it. If it is known, checks to make
sure that the isIndexed flag is the same as was given previously for this
field. If not - marks it as being indexed. Same goes for the TermVector
parameters.
Parameters: name - The name of the field Parameters: isIndexed - true if the field is indexed Parameters: storeTermVector - true if the term vector should be stored Parameters: storePositionWithTermVector - true if the term vector with positions should be stored Parameters: storeOffsetWithTermVector - true if the term vector with offsets should be stored Parameters: omitNorms - true if the norms for the indexed field should be omitted |
add | public FieldInfo add(String name, boolean isIndexed, boolean storeTermVector, boolean storePositionWithTermVector, boolean storeOffsetWithTermVector, boolean omitNorms, boolean storePayloads)(Code) | | If the field is not yet known, adds it. If it is known, checks to make
sure that the isIndexed flag is the same as was given previously for this
field. If not - marks it as being indexed. Same goes for the TermVector
parameters.
Parameters: name - The name of the field Parameters: isIndexed - true if the field is indexed Parameters: storeTermVector - true if the term vector should be stored Parameters: storePositionWithTermVector - true if the term vector with positions should be stored Parameters: storeOffsetWithTermVector - true if the term vector with offsets should be stored Parameters: omitNorms - true if the norms for the indexed field should be omitted Parameters: storePayloads - true if payloads should be stored for this field |
addIndexed | public void addIndexed(Collection names, boolean storeTermVectors, boolean storePositionWithTermVector, boolean storeOffsetWithTermVector)(Code) | | Add fields that are indexed. Whether they have termvectors has to be specified.
Parameters: names - The names of the fields Parameters: storeTermVectors - Whether the fields store term vectors or not Parameters: storePositionWithTermVector - treu if positions should be stored. Parameters: storeOffsetWithTermVector - true if offsets should be stored |
clone | public Object clone()(Code) | | Returns a deep clone of this FieldInfos instance.
|
fieldInfo | public FieldInfo fieldInfo(int fieldNumber)(Code) | | Return the fieldinfo object referenced by the fieldNumber.
Parameters: fieldNumber - the FieldInfo object or null when the given fieldNumberdoesn't exist. |
fieldName | public String fieldName(int fieldNumber)(Code) | | Return the fieldName identified by its number.
Parameters: fieldNumber - the fieldName or an empty string when the fieldwith the given number doesn't exist. |
hasVectors | public boolean hasVectors()(Code) | | |
|
|