public static enum

Field.Index

extends Enum<E extends Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ org.apache.lucene.document.Field.Index

Class Overview

Specifies whether and how a field should be indexed.

Summary

Enum Values
Field.Index  ANALYZED  Index the tokens produced by running the field's value through an Analyzer. 
Field.Index  ANALYZED_NO_NORMS  Expert: Index the tokens produced by running the field's value through an Analyzer, and also separately disable the storing of norms. 
Field.Index  NO  Do not index the field value. 
Field.Index  NOT_ANALYZED  Index the field's value without using an Analyzer, so it can be searched. 
Field.Index  NOT_ANALYZED_NO_NORMS  Expert: Index the field's value without an Analyzer, and also disable the storing of norms. 
Public Methods
abstract boolean isAnalyzed()
abstract boolean isIndexed()
abstract boolean omitNorms()
static Field.Index toIndex(boolean indexed, boolean analyzed, boolean omitNorms)
Expert: Get the best representation of the index given the flags.
static Field.Index toIndex(boolean indexed, boolean analyzed)
Get the best representation of the index given the flags.
static Field.Index valueOf(String name)
final static Index[] values()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

public static final Field.Index ANALYZED

Index the tokens produced by running the field's value through an Analyzer. This is useful for common text.

public static final Field.Index ANALYZED_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 NOT_ANALYZED_NO_NORMS for what norms are and why you may want to disable them.

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.

public static final Field.Index NOT_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 static final Field.Index NOT_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 setOmitNorms(boolean). 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 Methods

public abstract boolean isAnalyzed ()

public abstract boolean isIndexed ()

public abstract boolean omitNorms ()

public static Field.Index toIndex (boolean indexed, boolean analyzed, boolean omitNorms)

Expert: Get the best representation of the index given the flags.

public static Field.Index toIndex (boolean indexed, boolean analyzed)

Get the best representation of the index given the flags.

public static Field.Index valueOf (String name)

public static final Index[] values ()