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:

Members

dateValue :String

Contains the value of the field converted into a date object.
Type:
  • String
Source:

name :String

Contains the name of the field
Type:
  • String
Source:

value :String

Contains the string value of the field
Type:
  • String
Source:

Methods

(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:
Returns:
The value converted into a string

getBoost()

Returns the boost factor of this field.
Source:
Returns:
The boost factor of this field

getField()

Returns the wrapped field instance
Source:
Returns:
The wrapped field

isCompressed()

Returns true if this field's value is stored in compressed form in the index
Source:
Returns:
True if this field's value is compressed, false otherwise

isIndexed()

Returns true if this field is indexed
Source:
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:
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:
Returns:
True if this field's term vector is stored, false otherwise

isTokenized()

Returns true if this field's value is tokenized
Source:
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: