org.apache.lucene.document
Class FieldType

java.lang.Object
  extended by org.apache.lucene.document.FieldType
All Implemented Interfaces:
IndexableFieldType

public class FieldType
extends Object
implements IndexableFieldType

Describes the properties of a field.


Nested Class Summary
static class FieldType.NumericType
          Data type of the numeric value
 
Constructor Summary
FieldType()
           
FieldType(FieldType ref)
           
 
Method Summary
 DocValues.Type docValueType()
          DocValues type; if non-null then the field's value will be indexed into docValues
 void freeze()
          Prevents future changes.
 boolean indexed()
          True if this field should be indexed (inverted)
 FieldInfo.IndexOptions indexOptions()
          FieldInfo.IndexOptions, describing what should be recorded into the inverted index
 int numericPrecisionStep()
          Precision step for numeric field.
 FieldType.NumericType numericType()
          NumericDataType; if non-null then the field's value will be indexed numerically so that NumericRangeQuery can be used at search time.
 boolean omitNorms()
          True if norms should not be indexed
 void setDocValueType(DocValues.Type type)
           
 void setIndexed(boolean value)
           
 void setIndexOptions(FieldInfo.IndexOptions value)
           
 void setNumericPrecisionStep(int precisionStep)
           
 void setNumericType(FieldType.NumericType type)
           
 void setOmitNorms(boolean value)
           
 void setStored(boolean value)
           
 void setStoreTermVectorOffsets(boolean value)
           
 void setStoreTermVectorPositions(boolean value)
           
 void setStoreTermVectors(boolean value)
           
 void setTokenized(boolean value)
           
 boolean stored()
          True if the field's value should be stored
 boolean storeTermVectorOffsets()
          True if term vector offsets should be indexed
 boolean storeTermVectorPositions()
          True if term vector positions should be indexed
 boolean storeTermVectors()
          True if term vectors should be indexed
 boolean tokenized()
          True if this field's value should be analyzed
 String toString()
          Prints a Field for human consumption.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldType

public FieldType(FieldType ref)

FieldType

public FieldType()
Method Detail

freeze

public void freeze()
Prevents future changes. Note, it is recommended that this is called once the FieldTypes's properties have been set, to prevent unintentional state changes.


indexed

public boolean indexed()
Description copied from interface: IndexableFieldType
True if this field should be indexed (inverted)

Specified by:
indexed in interface IndexableFieldType

setIndexed

public void setIndexed(boolean value)

stored

public boolean stored()
Description copied from interface: IndexableFieldType
True if the field's value should be stored

Specified by:
stored in interface IndexableFieldType

setStored

public void setStored(boolean value)

tokenized

public boolean tokenized()
Description copied from interface: IndexableFieldType
True if this field's value should be analyzed

Specified by:
tokenized in interface IndexableFieldType

setTokenized

public void setTokenized(boolean value)

storeTermVectors

public boolean storeTermVectors()
Description copied from interface: IndexableFieldType
True if term vectors should be indexed

Specified by:
storeTermVectors in interface IndexableFieldType

setStoreTermVectors

public void setStoreTermVectors(boolean value)

storeTermVectorOffsets

public boolean storeTermVectorOffsets()
Description copied from interface: IndexableFieldType
True if term vector offsets should be indexed

Specified by:
storeTermVectorOffsets in interface IndexableFieldType

setStoreTermVectorOffsets

public void setStoreTermVectorOffsets(boolean value)

storeTermVectorPositions

public boolean storeTermVectorPositions()
Description copied from interface: IndexableFieldType
True if term vector positions should be indexed

Specified by:
storeTermVectorPositions in interface IndexableFieldType

setStoreTermVectorPositions

public void setStoreTermVectorPositions(boolean value)

omitNorms

public boolean omitNorms()
Description copied from interface: IndexableFieldType
True if norms should not be indexed

Specified by:
omitNorms in interface IndexableFieldType

setOmitNorms

public void setOmitNorms(boolean value)

indexOptions

public FieldInfo.IndexOptions indexOptions()
Description copied from interface: IndexableFieldType
FieldInfo.IndexOptions, describing what should be recorded into the inverted index

Specified by:
indexOptions in interface IndexableFieldType

setIndexOptions

public void setIndexOptions(FieldInfo.IndexOptions value)

setDocValueType

public void setDocValueType(DocValues.Type type)

docValueType

public DocValues.Type docValueType()
Description copied from interface: IndexableFieldType
DocValues type; if non-null then the field's value will be indexed into docValues

Specified by:
docValueType in interface IndexableFieldType

setNumericType

public void setNumericType(FieldType.NumericType type)

numericType

public FieldType.NumericType numericType()
NumericDataType; if non-null then the field's value will be indexed numerically so that NumericRangeQuery can be used at search time.


setNumericPrecisionStep

public void setNumericPrecisionStep(int precisionStep)

numericPrecisionStep

public int numericPrecisionStep()
Precision step for numeric field.


toString

public final String toString()
Prints a Field for human consumption.

Overrides:
toString in class Object


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.