A field is a section of a Document. Each field has two parts, a name and a value. Values may be free text, provided as a String or as a Reader, or they may be atomic keywords, which are not further processed. Such keywords may be used to represent dates, urls, etc. Fields are optionally stored in the index, so that they may be returned with hits on the document.

The Field..::..Index type exposes the following members.

Methods

  NameDescription
Public methodEquals
Resolves the deserialized instance to the local reference for accurate equals() and == comparisons.
(Inherited from Parameter.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString (Inherited from Parameter.)

Fields

  NameDescription
Public fieldStatic memberANALYZED
Index the tokens produced by running the field's value through an Analyzer. This is useful for common text.
Public fieldStatic memberANALYZED_NO_NORMS
Expert: Index the tokens produced by running the field's value through an Analyzer, and also separately disable the storing of norms. See {@link #NOT_ANALYZED_NO_NORMS} for what norms are and why you may want to disable them.
Public fieldStatic memberNO
Do not index the field value. This field can thus not be searched, but one can still access its contents provided it is {@link Field.Store stored}.
Public fieldStatic memberNO_NORMS Obsolete.
Public fieldStatic memberNOT_ANALYZED
Index the field's value without using an Analyzer, so it can be searched. As no analyzer is used the value will be stored as a single term. This is useful for unique Ids like product numbers.
Public fieldStatic memberNOT_ANALYZED_NO_NORMS
Expert: Index the field's value without an Analyzer, and also disable the storing of norms. Note that you can also separately enable/disable norms by calling {@link Field#setOmitNorms}. No norms means that index-time field and document boosting and field length normalization are disabled. The benefit is less memory usage as norms take up one byte of RAM per indexed field for every document in the index, during searching. Note that once you index a given field with norms enabled, disabling norms will have no effect. In other words, for this to have the above described effect on a field, all instances of that field must be indexed with NOT_ANALYZED_NO_NORMS from the beginning.
Public fieldStatic memberTOKENIZED Obsolete.
Public fieldStatic memberUN_TOKENIZED Obsolete.

See Also