Package org.apache.lucene.document
Class LazyDocument.LazyField
- java.lang.Object
-
- org.apache.lucene.document.LazyDocument.LazyField
-
- All Implemented Interfaces:
IndexableField
- Enclosing class:
- LazyDocument
public class LazyDocument.LazyField extends java.lang.Object implements IndexableField
-
-
Field Summary
Fields Modifier and Type Field Description private intfieldNumprivate java.lang.Stringname(package private) IndexableFieldrealValue
-
Constructor Summary
Constructors Modifier Constructor Description privateLazyField(java.lang.String name, int fieldNum)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BytesRefbinaryValue()Non-null if this field has a binary valueIndexableFieldTypefieldType()IndexableFieldTypedescribing the properties of this field.private IndexableFieldgetRealValue()booleanhasBeenLoaded()non-private for test only accessjava.lang.Stringname()Field namejava.lang.NumbernumericValue()Non-null if this field has a numeric valuejava.io.ReaderreaderValue()Non-null if this field has a Reader valuejava.lang.StringstringValue()Non-null if this field has a string valueTokenStreamtokenStream(Analyzer analyzer, TokenStream reuse)Creates the TokenStream used for indexing this field.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.index.IndexableField
getCharSequenceValue
-
-
-
-
Field Detail
-
name
private java.lang.String name
-
fieldNum
private int fieldNum
-
realValue
volatile IndexableField realValue
-
-
Method Detail
-
hasBeenLoaded
public boolean hasBeenLoaded()
non-private for test only access
-
getRealValue
private IndexableField getRealValue()
-
name
public java.lang.String name()
Description copied from interface:IndexableFieldField name- Specified by:
namein interfaceIndexableField
-
binaryValue
public BytesRef binaryValue()
Description copied from interface:IndexableFieldNon-null if this field has a binary value- Specified by:
binaryValuein interfaceIndexableField
-
stringValue
public java.lang.String stringValue()
Description copied from interface:IndexableFieldNon-null if this field has a string value- Specified by:
stringValuein interfaceIndexableField
-
readerValue
public java.io.Reader readerValue()
Description copied from interface:IndexableFieldNon-null if this field has a Reader value- Specified by:
readerValuein interfaceIndexableField
-
numericValue
public java.lang.Number numericValue()
Description copied from interface:IndexableFieldNon-null if this field has a numeric value- Specified by:
numericValuein interfaceIndexableField
-
fieldType
public IndexableFieldType fieldType()
Description copied from interface:IndexableFieldIndexableFieldTypedescribing the properties of this field.- Specified by:
fieldTypein interfaceIndexableField
-
tokenStream
public TokenStream tokenStream(Analyzer analyzer, TokenStream reuse)
Description copied from interface:IndexableFieldCreates the TokenStream used for indexing this field. If appropriate, implementations should use the given Analyzer to create the TokenStreams.- Specified by:
tokenStreamin interfaceIndexableField- Parameters:
analyzer- Analyzer that should be used to create the TokenStreams fromreuse- TokenStream for a previous instance of this field name. This allows custom field types (like StringField and NumericField) that do not use the analyzer to still have good performance. Note: the passed-in type may be inappropriate, for example if you mix up different types of Fields for the same field name. So it's the responsibility of the implementation to check.- Returns:
- TokenStream value for indexing the document. Should always return a non-null value if the field is to be indexed
-
-