Class LazyDocument.LazyField
@lucene.internal
Inheritance
Implements
Namespace: Lucene.Net.Documents
Assembly: Lucene.Net.Misc.dll
Syntax
public class LazyField : object, IIndexableField
Properties
| Improve this Doc View SourceBoost
Gets the boost factor on this field.
Declaration
public virtual float Boost { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
FieldType
Declaration
public virtual FieldType FieldType { get; }
Property Value
| Type | Description |
|---|---|
| FieldType |
HasBeenLoaded
non-private for test only access @lucene.internal
Declaration
public virtual bool HasBeenLoaded { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IndexableFieldType
Returns the FieldType for this field as type IIndexableFieldType.
Declaration
public virtual IIndexableFieldType IndexableFieldType { get; }
Property Value
| Type | Description |
|---|---|
| IIndexableFieldType |
Name
The field's name
Declaration
public virtual string Name { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
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
GetNumericValue(). However, since there are no reference number
types in .NET, using GetNumericValue() so will cause boxing/unboxing. It is
therefore recommended to use this property to check the underlying type and the corresponding
Get*Value() method to retrieve the value.
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.
Declaration
public virtual NumericFieldType NumericType { get; }
Property Value
| Type | Description |
|---|---|
| NumericFieldType |
Methods
| Improve this Doc View SourceGetBinaryValue()
Non-null if this field has a binary value.
Declaration
public virtual BytesRef GetBinaryValue()
Returns
| Type | Description |
|---|---|
| BytesRef |
GetByteValue()
Returns the field value as null if the type
is non-numeric.
Declaration
public virtual byte? GetByteValue()
Returns
| Type | Description |
|---|---|
| System.Nullable<System.Byte> | The field value or |
GetDoubleValue()
Returns the field value as null if the type
is non-numeric.
Declaration
public virtual double? GetDoubleValue()
Returns
| Type | Description |
|---|---|
| System.Nullable<System.Double> | The field value or |
GetInt16Value()
Returns the field value as null if the type
is non-numeric.
Declaration
public virtual short? GetInt16Value()
Returns
| Type | Description |
|---|---|
| System.Nullable<System.Int16> | The field value or |
GetInt32Value()
Returns the field value as null if the type
is non-numeric.
Declaration
public virtual int? GetInt32Value()
Returns
| Type | Description |
|---|---|
| System.Nullable<System.Int32> | The field value or |
GetInt64Value()
Returns the field value as null if the type
is non-numeric.
Declaration
public virtual long? GetInt64Value()
Returns
| Type | Description |
|---|---|
| System.Nullable<System.Int64> | The field value or |
GetNumericValue()
Declaration
public virtual object GetNumericValue()
Returns
| Type | Description |
|---|---|
| System.Object |
GetReaderValue()
The value of the field as a null. If null, the
Declaration
public virtual TextReader GetReaderValue()
Returns
| Type | Description |
|---|---|
| TextReader |
GetSingleValue()
Returns the field value as null if the type
is non-numeric.
Declaration
public virtual float? GetSingleValue()
Returns
| Type | Description |
|---|---|
| System.Nullable<System.Single> | The field value or |
GetStringValue()
The value of the field as a null. If null, the
Declaration
public virtual string GetStringValue()
Returns
| Type | Description |
|---|---|
| System.String | The string representation of the value if it is either a |
GetStringValue(IFormatProvider)
The value of the field as a null. If null, the
Declaration
public virtual string GetStringValue(IFormatProvider provider)
Parameters
| Type | Name | Description |
|---|---|---|
| IFormatProvider | provider | An object that supplies culture-specific formatting information. This parameter has no effect if this field is non-numeric. |
Returns
| Type | Description |
|---|---|
| System.String | The string representation of the value if it is either a |
GetStringValue(String)
The value of the field as a null. If null, the
Declaration
public virtual string GetStringValue(string format)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | format | A standard or custom numeric format string. This parameter has no effect if this field is non-numeric. |
Returns
| Type | Description |
|---|---|
| System.String | The string representation of the value if it is either a |
GetStringValue(String, IFormatProvider)
The value of the field as a null. If null, the
Declaration
public virtual string GetStringValue(string format, IFormatProvider provider)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | format | A standard or custom numeric format string. This parameter has no effect if this field is non-numeric. |
| IFormatProvider | provider | An object that supplies culture-specific formatting information. This parameter has no effect if this field is non-numeric. |
Returns
| Type | Description |
|---|---|
| System.String | The string representation of the value if it is either a |
GetTokenStream(Analyzer)
Declaration
public virtual TokenStream GetTokenStream(Analyzer analyzer)
Parameters
| Type | Name | Description |
|---|---|---|
| Analyzer | analyzer |
Returns
| Type | Description |
|---|---|
| TokenStream |