# Class: Field

## helma.Search.Document.Field(name, value, options)

Instances of this class represent a single field

## Constructor

#### new Field(name, value, options)

Creates a new Field instance

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | Object | The name of the field
`value` | Object | The value of the field

`options`

Object

Optional object containing the following properties (each of them is optional too):

- `store` (String) Defines whether and how the value is stored in the field. Accepted values are "no", "yes" and "compress" (defaults to "yes")
- `index` (String) Defines whether and how the value is indexed in the field. Accepted values are "no", "tokenized", "unTokenized" and "noNorms" (defaults to "tokenized")
- `termVector` (String) Defines if and how the fiels should have term vectors. Accepted values are "no", "yes", "withOffsets", "withPositions" and "withPositionsAndOffsets" (defaults to "no")

Source:
  - helma/Search.js, line 1259

### Members

#### dateValue :String

Contains the value of the field converted into a date object.

##### Type:

- String

Source:
  - helma/Search.js, line 1284

#### name :String

Contains the name of the field

##### Type:

- String

Source:
  - helma/Search.js, line 1266

#### value :String

Contains the string value of the field

##### Type:

- String

Source:
  - helma/Search.js, line 1275

### Methods

#### getBoost()

Returns the boost factor of this field.

Source:
  - helma/Search.js, line 1392

##### Returns:

The boost factor of this field

#### getField()

Returns the wrapped field instance

Source:
  - helma/Search.js, line 1294

##### Returns:

The wrapped field

#### isCompressed()

Returns true if this field's value is stored in compressed form in the index

Source:
  - helma/Search.js, line 1420

##### Returns:

True if this field's value is compressed, false otherwise

#### isIndexed()

Returns true if this field is indexed

Source:
  - helma/Search.js, line 1411

##### Returns:

True if this field's value is indexed, false otherwise

#### isStored()

Returns true if this field's value is stored in the index

Source:
  - helma/Search.js, line 1429

##### Returns:

True if this field's value is stored, false otherwise

#### isTermVectorStored()

Returns true if this field's term vector is stored in the index

Source:
  - helma/Search.js, line 1447

##### Returns:

True if this field's term vector is stored, false otherwise

#### isTokenized()

Returns true if this field's value is tokenized

Source:
  - helma/Search.js, line 1438

##### Returns:

True if this field's value is tokenized, false otherwise

#### setBoost(boost)

Sets the boost factor of this field.

##### Parameters:

Name | Type | Description
--- | --- | ---
`boost` | Number | The boost factor of this field

Source:
  - helma/Search.js, line 1400

#### (static) valueToString(value)

Converts the value passed as argument to the appropriate string value. For null values this method returns an empty string.

##### Parameters:

Name | Type | Description
--- | --- | ---
`value` | Object | The value to convert into a string

Source:
  - helma/Search.js, line 1369

##### Returns:

The value converted into a string