StoredField

constructor(name: String, bytes: BytesRef, type: FieldType)

Expert: allows you to customize the FieldType.

NOTE: the provided byte[] is not copied so be sure not to change it until you're done with this field.

Parameters

name

field name

bytes

byte array pointing to binary content (not copied)

type

custom FieldType for this field

Throws

if the field name, value or type is null.


constructor(name: String, value: ByteArray)

Create a stored-only field with the given binary value.

NOTE: the provided byte[] is not copied so be sure not to change it until you're done with this field.

Parameters

name

field name

value

byte array pointing to binary content (not copied)

Throws

if the field name or value is null.


constructor(name: String, value: ByteArray, offset: Int, length: Int)

Create a stored-only field with the given binary value.

NOTE: the provided byte[] is not copied so be sure not to change it until you're done with this field.

Parameters

name

field name

value

byte array pointing to binary content (not copied)

offset

starting position of the byte array

length

valid length of the byte array

Throws

if the field name or value is null.


constructor(name: String, value: BytesRef)

Create a stored-only field with the given binary value.

NOTE: the provided BytesRef is not copied so be sure not to change it until you're done with this field.

Parameters

name

field name

value

BytesRef pointing to binary content (not copied)

Throws

if the field name or value is null.


constructor(name: String, value: StoredFieldDataInput)

Create a stored-only field with the given data input value.

Parameters

name

field name

value

BytesRef pointing to binary content (not copied)

Throws

if the field name or value is null.


constructor(name: String, value: String)

Create a stored-only field with the given string value.

Parameters

name

field name

value

string value

Throws

if the field name or value is null.


constructor(name: String, value: String, type: FieldType)

Expert: allows you to customize the FieldType.

Parameters

name

field name

value

string value

type

custom FieldType for this field

Throws

if the field name, value or type is null.


constructor(name: String, value: CharSequence, type: FieldType)

Expert: allows you to customize the FieldType.

Parameters

name

field name

value

CharSequence value

type

custom FieldType for this field

Throws

if the field name, value or type is null.


constructor(name: String, value: Int)

Create a stored-only field with the given integer value.

Parameters

name

field name

value

integer value

Throws

if the field name is null.


constructor(name: String, value: Float)

Create a stored-only field with the given float value.

Parameters

name

field name

value

float value

Throws

if the field name is null.


constructor(name: String, value: Long)

Create a stored-only field with the given long value.

Parameters

name

field name

value

long value

Throws

if the field name is null.


constructor(name: String, value: Double)

Create a stored-only field with the given double value.

Parameters

name

field name

value

double value

Throws

if the field name is null.