Interface IIndexableField
Represents a single field for indexing. IndexWriter consumes IEnumerable<IndexableField> as a document.
@lucene.experimental
Assembly: DistributedLucene.Net.dll
Syntax
public interface IIndexableField
Properties
Name | Description |
---|---|
Boost | Returns the field's index-time boost. 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 ComputeNorm(FieldInvertState) method, the boost value is multiplied by the length normalization factor and then rounded by EncodeNormValue(Single) 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 (IsIndexed is false) or omits normalization values (OmitNorms returns true). |
IndexableFieldType | IIndexableFieldType describing the properties of this field. |
Name | Field name |
NumericType | Gets the NumericFieldType of the underlying value, or NONE if the value is not set or non-numeric. Expert: The difference between this property and NumericType is this is represents the current state of the field (whether being written or read) and the FieldType property represents instructions on how the field will be written, but does not re-populate when reading back from an index (it is write-only).
In Java, the numeric type was determined by checking the type of NOTE: Since Lucene codecs do not support BYTE or INT16, fields created with these types will always be INT32 when read back from the index. |
Methods
Name | Description |
---|---|
GetBinaryValue() | Non-null if this field has a binary value. |
GetByteValue() | Returns the field value as |
GetDoubleValue() | Returns the field value as |
GetInt16Value() | Returns the field value as |
GetInt32Value() | Returns the field value as |
GetInt64Value() | Returns the field value as |
GetNumericValue() | Non-null if this field has a numeric value. |
GetReaderValue() | Non-null if this field has a |
GetSingleValue() | Returns the field value as |
GetStringValue() | Non-null if this field has a string value. |
GetStringValue(IFormatProvider) | The value of the field as a |
GetStringValue(String) | The value of the field as a |
GetStringValue(String, IFormatProvider) | The value of the field as a |
GetTokenStream(Analyzer) | Creates the TokenStream used for indexing this field. If appropriate, implementations should use the given Analyzer to create the TokenStreams. |