public class LazyDocument.LazyField extends Object implements IndexableField
| Modifier and Type | Method and Description |
|---|---|
BytesRef |
binaryValue()
Non-null if this field has a binary value
|
float |
boost()
Returns the field's index-time boost.
|
IndexableFieldType |
fieldType()
IndexableFieldType describing the properties
of this field. |
boolean |
hasBeenLoaded()
non-private for test only access
|
String |
name()
Field name
|
Number |
numericValue()
Non-null if this field has a numeric value
|
Reader |
readerValue()
Non-null if this field has a Reader value
|
String |
stringValue()
Non-null if this field has a string value
|
TokenStream |
tokenStream(Analyzer analyzer)
Creates the TokenStream used for indexing this field.
|
public boolean hasBeenLoaded()
public String name()
IndexableFieldname in interface IndexableFieldpublic float boost()
IndexableFieldOnly fields can have an index-time boost, if you want to simulate a "document boost", then you must pre-multiply it across all the relevant fields yourself.
The boost is used to compute the norm factor for the field. By
default, in the Similarity.computeNorm(FieldInvertState) method,
the boost value is multiplied by the length normalization factor and then
rounded by DefaultSimilarity.encodeNormValue(float) before it is stored in the
index. One should attempt to ensure that this product does not overflow
the range of that encoding.
It is illegal to return a boost other than 1.0f for a field that is not
indexed (IndexableFieldType.indexed() is false) or omits normalization values
(IndexableFieldType.omitNorms() returns true).
boost in interface IndexableFieldSimilarity.computeNorm(FieldInvertState),
DefaultSimilarity.encodeNormValue(float)public BytesRef binaryValue()
IndexableFieldbinaryValue in interface IndexableFieldpublic String stringValue()
IndexableFieldstringValue in interface IndexableFieldpublic Reader readerValue()
IndexableFieldreaderValue in interface IndexableFieldpublic Number numericValue()
IndexableFieldnumericValue in interface IndexableFieldpublic IndexableFieldType fieldType()
IndexableFieldIndexableFieldType describing the properties
of this field.fieldType in interface IndexableFieldpublic TokenStream tokenStream(Analyzer analyzer) throws IOException
IndexableFieldtokenStream in interface IndexableFieldanalyzer - Analyzer that should be used to create the TokenStreams fromIOException - Can be thrown while creating the TokenStreamCopyright © 2010 - 2020 Adobe. All Rights Reserved