Class NumericTokenStream.NumericTermAttribute
Implementation of NumericTokenStream.INumericTermAttribute.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Analysis
Assembly: Lucene.Net.dll
Syntax
public sealed class NumericTokenStream.NumericTermAttribute : Attribute, NumericTokenStream.INumericTermAttribute, ITermToBytesRefAttribute, IAttribute
Constructors
NumericTermAttribute()
Creates, but does not yet initialize this attribute instance
Declaration
public NumericTermAttribute()
See Also
Properties
BytesRef
Retrieve this attribute's BytesRef. The bytes are updated from the current term when the consumer calls FillBytesRef().
Declaration
public BytesRef BytesRef { get; }
Property Value
Type | Description |
---|---|
BytesRef | this IAttributes internal BytesRef. |
RawValue
Declaration
public long RawValue { get; }
Property Value
Type | Description |
---|---|
long |
Shift
Returns current shift value, undefined before first token
Declaration
public int Shift { get; set; }
Property Value
Type | Description |
---|---|
int |
ValueSize
Declaration
public int ValueSize { get; }
Property Value
Type | Description |
---|---|
int |
Methods
Clear()
Clears the values in this Attribute and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.
Declaration
public override void Clear()
Overrides
CopyTo(IAttribute)
Copies the values from this Attribute into the passed-in
target
attribute. The target
implementation must support all the
IAttributes this implementation supports.
Declaration
public override void CopyTo(IAttribute target)
Parameters
Type | Name | Description |
---|---|---|
IAttribute | target |
Overrides
FillBytesRef()
Updates the bytes BytesRef to contain this term's final encoding.
Declaration
public void FillBytesRef()
IncShift()
Don't call this method!
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
public int IncShift()
Returns
Type | Description |
---|---|
int |
Init(long, int, int, int)
Don't call this method!
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
public void Init(long value, int valueSize, int precisionStep, int shift)
Parameters
Type | Name | Description |
---|---|---|
long | value | |
int | valueSize | |
int | precisionStep | |
int | shift |
ReflectWith(IAttributeReflector)
This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given IAttributeReflector.
The default implementation calls Reflect(Type, string, object) for all non-static fields from the implementing class, using the field name as key and the field value as value. The IAttribute class is also determined by Reflection. Please note that the default implementation can only handle single-Attribute implementations. Custom implementations look like this (e.g. for a combined attribute implementation):public void ReflectWith(IAttributeReflector reflector)
{
reflector.Reflect(typeof(ICharTermAttribute), "term", GetTerm());
reflector.Reflect(typeof(IPositionIncrementAttribute), "positionIncrement", GetPositionIncrement());
}
If you implement this method, make sure that for each invocation, the same set of IAttribute
interfaces and keys are passed to Reflect(Type, string, object) in the same order, but possibly
different values. So don't automatically exclude e.g. null
properties!
Declaration
public override void ReflectWith(IAttributeReflector reflector)
Parameters
Type | Name | Description |
---|---|---|
IAttributeReflector | reflector |