Package org.apache.lucene.document
Enum FieldSelectorResult
- java.lang.Object
-
- java.lang.Enum<FieldSelectorResult>
-
- org.apache.lucene.document.FieldSelectorResult
-
- All Implemented Interfaces:
Serializable,Comparable<FieldSelectorResult>
public enum FieldSelectorResult extends Enum<FieldSelectorResult>
Provides information about what should be done with this Field
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LATENTLazily load thisField, but do not cache the result.LAZY_LOADLazily load thisField.LOADLOAD_AND_BREAKNO_LOADDo not load theField.SIZEExpert: Load the size of thisFieldrather than its value.SIZE_AND_BREAKExpert: LikeSIZEbut immediately break from the field loading loop, i.e., stop loading further fields, after the size is loaded
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FieldSelectorResultvalueOf(String name)Returns the enum constant of this type with the specified name.static FieldSelectorResult[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LOAD
public static final FieldSelectorResult LOAD
Load thisFieldevery time theDocumentis loaded, reading in the data as it is encountered.Document.getField(String)andDocument.getFieldable(String)should not return null.Document.add(Fieldable)should be called by the Reader.
-
LAZY_LOAD
public static final FieldSelectorResult LAZY_LOAD
Lazily load thisField. This means theFieldis valid, but it may not actually contain its data until invoked.Document.getField(String)SHOULD NOT BE USED.Document.getFieldable(String)is safe to use and should return a valid instance of aFieldable.Document.add(Fieldable)should be called by the Reader.
-
NO_LOAD
public static final FieldSelectorResult NO_LOAD
Do not load theField.Document.getField(String)andDocument.getFieldable(String)should return null.Document.add(Fieldable)is not called.Document.add(Fieldable)should not be called by the Reader.
-
LOAD_AND_BREAK
public static final FieldSelectorResult LOAD_AND_BREAK
Load this field as in theLOADcase, but immediately return fromFieldloading for theDocument. Thus, the Document may not have its complete set of Fields.Document.getField(String)andDocument.getFieldable(String)should both be valid for thisFieldDocument.add(Fieldable)should be called by the Reader.
-
SIZE
public static final FieldSelectorResult SIZE
Expert: Load the size of thisFieldrather than its value. Size is measured as number of bytes required to store the field == bytes for a binary or any compressed value, and 2*chars for a String value. The size is stored as a binary value, represented as an int in a byte[], with the higher order byte first in [0]
-
SIZE_AND_BREAK
public static final FieldSelectorResult SIZE_AND_BREAK
Expert: LikeSIZEbut immediately break from the field loading loop, i.e., stop loading further fields, after the size is loaded
-
LATENT
public static final FieldSelectorResult LATENT
Lazily load thisField, but do not cache the result. This means theFieldis valid, but it may not actually contain its data until invoked.Document.getField(String)SHOULD NOT BE USED.Document.getFieldable(String)is safe to use and should return a valid instance of aFieldable.Document.add(Fieldable)should be called by the Reader.
-
-
Method Detail
-
values
public static FieldSelectorResult[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FieldSelectorResult c : FieldSelectorResult.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FieldSelectorResult valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-