## org.apache.lucene.document
Class Field.Index

    java.lang.Object
      org.apache.lucene.util.Parameter
          org.apache.lucene.document.Field.Index

All Implemented Interfaces:
  Serializable

Enclosing class:
  Field

    public static final class Field.Index

extends Parameter
implements Serializable

Specifies whether and how a field should be indexed.

See Also:
  Serialized Form

Field Summary
`static Field.Index` `NO` Do not index the field value.
`static Field.Index` `NO_NORMS` Index the field's value without an Analyzer, and disable the storing of norms.
`static Field.Index` `TOKENIZED` Index the field's value so it can be searched.
`static Field.Index` `UN_TOKENIZED` Index the field's value without using an Analyzer, so it can be searched.

Method Summary

Methods inherited from class org.apache.lucene.util.Parameter
`readResolve, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### NO

    public static final Field.Index NO

  Do not index the field value. This field can thus not be searched, but one can still access its contents provided it is `stored`.

### TOKENIZED

    public static final Field.Index TOKENIZED

  Index the field's value so it can be searched. An Analyzer will be used to tokenize and possibly further normalize the text before its terms will be stored in the index. This is useful for common text.

### UN_TOKENIZED

    public static final Field.Index UN_TOKENIZED

  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.

### NO_NORMS

    public static final Field.Index NO_NORMS

  Index the field's value without an Analyzer, and disable the storing of norms. No norms means that index-time boosting and field length normalization will be disabled. The benefit is less memory usage as norms take up one byte per indexed field for every document in the index. Note that once you index a given field with norms enabled, disabling norms will have no effect. In other words, for NO_NORMS to have the above described effect on a field, all instances of that field must be indexed with NO_NORMS from the beginning.

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