Class ICUCollationDocValuesField
Indexes sort keys as a single-valued Lucene.Net.Documents.SortedDocValuesField.
Inherited Members
Namespace: Lucene.Net.Collation
Assembly: Lucene.Net.ICU.dll
Syntax
public sealed class ICUCollationDocValuesField : Field, IIndexableField, IFormattable
Remarks
This is more efficient that ICUCollationKeyAnalyzer if the field only has one value: no uninversion is necessary to sort on the field, locale-sensitive range queries can still work via Lucene.Net.Search.FieldCacheRangeFilter, and the underlying data structures built at index-time are likely more efficient and use less memory than FieldCache.
Constructors
ICUCollationDocValuesField(string, Collator)
Create a new ICUCollationDocValuesField.
NOTE: you should not create a new one for each document, instead just make one and reuse it during your indexing process, setting the value via SetStringValue(string).Declaration
public ICUCollationDocValuesField(string name, Collator collator)
Parameters
Type | Name | Description |
---|---|---|
string | name | Field name. |
Collator | collator | Collator for generating collation keys. |
Remarks
This is more efficient that ICUCollationKeyAnalyzer if the field only has one value: no uninversion is necessary to sort on the field, locale-sensitive range queries can still work via Lucene.Net.Search.FieldCacheRangeFilter, and the underlying data structures built at index-time are likely more efficient and use less memory than FieldCache.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | if |
Properties
Name
The field's name
Declaration
public override string Name { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Remarks
This is more efficient that ICUCollationKeyAnalyzer if the field only has one value: no uninversion is necessary to sort on the field, locale-sensitive range queries can still work via Lucene.Net.Search.FieldCacheRangeFilter, and the underlying data structures built at index-time are likely more efficient and use less memory than FieldCache.
Methods
SetStringValue(string)
Expert: change the value of this field. This can be used during indexing to re-use a single Lucene.Net.Documents.Field instance to improve indexing speed by avoiding GC cost of new'ing and reclaiming Lucene.Net.Documents.Field instances. Typically a single Lucene.Net.Documents.Document instance is re-used as well. This helps most on small documents.
Each Lucene.Net.Documents.Field instance should only be used once within a single Lucene.Net.Documents.Document instance. See ImproveIndexingSpeed for details.
Declaration
public override void SetStringValue(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value |
Overrides
Remarks
This is more efficient that ICUCollationKeyAnalyzer if the field only has one value: no uninversion is necessary to sort on the field, locale-sensitive range queries can still work via Lucene.Net.Search.FieldCacheRangeFilter, and the underlying data structures built at index-time are likely more efficient and use less memory than FieldCache.