Class StringField
A field that is indexed but not tokenized: the entire string value is indexed as a single token. For example this might be used for a 'country' field or an 'id' field, or any field that you intend to use for sorting or access through the field cache.
Inherited Members
Namespace: Lucene.Net.Documents
Assembly: Lucene.Net.dll
Syntax
public sealed class StringField : Field, IIndexableField, IFormattable
Constructors
StringField(string, string, Store)
Creates a new StringField (a field that is indexed but not tokenized)
Declaration
public StringField(string name, string value, Field.Store stored)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | field name |
| string | value | string value |
| Field.Store | stored | YES if the content should also be stored |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | if the field |
Fields
TYPE_NOT_STORED
Indexed, not tokenized, omits norms, indexes DOCS_ONLY, not stored.
Declaration
public static readonly FieldType TYPE_NOT_STORED
Field Value
| Type | Description |
|---|---|
| FieldType |
TYPE_STORED
Indexed, not tokenized, omits norms, indexes DOCS_ONLY, stored
Declaration
public static readonly FieldType TYPE_STORED
Field Value
| Type | Description |
|---|---|
| FieldType |