Constructor Field
Field(String, String, Field.Store, Field.Index)
Create a field by specifying its name, value and how it will be saved in the index. Term vectors will not be stored in the index.
Declaration
public Field(String name, String value, Field.Store store, Field.Index index)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the field |
System.String | value | The string to process |
Field.Store | store | Whether |
Field.Index | index | Whether the field should be indexed, and if so, if it should be tokenized before indexing |
Field(String, String, Field.Store, Field.Index, Field.TermVector)
Create a field by specifying its name, value and how it will be saved in the index.
Declaration
public Field(String name, String value, Field.Store store, Field.Index index, Field.TermVector termVector)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the field |
System.String | value | The string to process |
Field.Store | store | Whether |
Field.Index | index | Whether the field should be indexed, and if so, if it should be tokenized before indexing |
Field.TermVector | termVector | Whether term vector should be stored |
Field(String, Boolean, String, Field.Store, Field.Index, Field.TermVector)
Create a field by specifying its name, value and how it will be saved in the index.
Declaration
public Field(String name, bool internName, String value, Field.Store store, Field.Index index, Field.TermVector termVector)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the field |
System.Boolean | internName | Whether to .intern() name or not |
System.String | value | The string to process |
Field.Store | store | Whether |
Field.Index | index | Whether the field should be indexed, and if so, if it should be tokenized before indexing |
Field.TermVector | termVector | Whether term vector should be stored |
Field(String, IO.TextReader)
Create a tokenized and indexed field that is not stored. Term vectors will not be stored. The Reader is read only when the Document is added to the index, i.e. you may not close the Reader until AddDocument(Document) has been called.
Declaration
public Field(String name, IO.TextReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the field |
System.IO.TextReader | reader | The reader with the content |
Field(String, IO.TextReader, Field.TermVector)
Create a tokenized and indexed field that is not stored, optionally with storing term vectors. The Reader is read only when the Document is added to the index, i.e. you may not close the Reader until AddDocument(Document) has been called.
Declaration
public Field(String name, IO.TextReader reader, Field.TermVector termVector)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the field |
System.IO.TextReader | reader | The reader with the content |
Field.TermVector | termVector | Whether term vector should be stored |
Field(String, TokenStream)
Create a tokenized and indexed field that is not stored. Term vectors will not be stored. This is useful for pre-analyzed fields. The TokenStream is read only when the Document is added to the index, i.e. you may not close the TokenStream until AddDocument(Document) has been called.
Declaration
public Field(String name, TokenStream tokenStream)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the field |
TokenStream | tokenStream | The TokenStream with the content |
Field(String, TokenStream, Field.TermVector)
Create a tokenized and indexed field that is not stored, optionally with storing term vectors. This is useful for pre-analyzed fields. The TokenStream is read only when the Document is added to the index, i.e. you may not close the TokenStream until AddDocument(Document) has been called.
Declaration
public Field(String name, TokenStream tokenStream, Field.TermVector termVector)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the field |
TokenStream | tokenStream | The TokenStream with the content |
Field.TermVector | termVector | Whether term vector should be stored |
Field(String, Byte[], Field.Store)
Create a stored field with binary value. Optionally the value may be compressed.
Declaration
public Field(String name, byte[] value_Renamed, Field.Store store)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the field |
System.Byte[] | value_Renamed | The binary value |
Field.Store | store | How |
Field(String, Byte[], Int32, Int32, Field.Store)
Create a stored field with binary value. Optionally the value may be compressed.
Declaration
public Field(String name, byte[] value_Renamed, int offset, int length, Field.Store store)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the field |
System.Byte[] | value_Renamed | The binary value |
System.Int32 | offset | Starting offset in value where this Field's bytes are |
System.Int32 | length | Number of bytes to use for this Field, starting at offset |
Field.Store | store | How |