|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IndexableField
Represents a single field for indexing. IndexWriter
consumes Iterable
Only 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
It is illegal to return a boost other than 1.0f for a field that is not
indexed (
Method Summary
BytesRefbinaryValue()
Non-null if this field has a binary value
floatboost()
Returns the field's index-time boost.
IndexableFieldTypefieldType()
IndexableFieldType describing the properties
of this field.
Stringname()
Field name
NumbernumericValue()
Non-null if this field has a numeric value
ReaderreaderValue()
Non-null if this field has a Reader value
StringstringValue()
Non-null if this field has a string value
TokenStreamtokenStream(Analyzer analyzer)
Creates the TokenStream used for indexing this field.
Method Detail
name
String name()
fieldType
IndexableFieldType fieldType()
IndexableFieldType describing the properties
of this field.
boost
float boost()
Similarity.computeNorm(FieldInvertState, Norm) method,
the boost value is multiplied by the length normalization factor and then
rounded by TFIDFSimilarity.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.
IndexableFieldType.indexed() is false) or omits normalization values
(IndexableFieldType.omitNorms() returns true).
binaryValue
BytesRef binaryValue()
stringValue
String stringValue()
readerValue
Reader readerValue()
numericValue
Number numericValue()
tokenStream
TokenStream tokenStream(Analyzer analyzer)
throws IOException
analyzer - Analyzer that should be used to create the TokenStreams from
IOException - Can be thrown while creating the TokenStream
Overview
Package
Class
Use
Tree
Deprecated
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.