A Document is a set of fields. Each field has a name and a textual value.

category Zend
package Zend_Search_Lucene
subpackage Document
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Proxy method for getFieldValue(), provides more convenient access to the string value of a field.

__get(string $offset) : string

Parameters

$offset

string

Returns

string

Add a field object to this document.

addField(\Zend_Search_Lucene_Field $field) : \Zend_Search_Lucene_Document

Parameters

$field

\Zend_Search_Lucene_Field

Returns

\Zend_Search_Lucene_Document

Returns Zend_Search_Lucene_Field object for a named field in this document.

getField(string $fieldName) : \Zend_Search_Lucene_Field

Parameters

$fieldName

string

Returns

\Zend_Search_Lucene_Field

Return an array with the names of the fields in this document.

getFieldNames() : array

Returns

array

Returns the string value of a named field in UTF-8 encoding.

getFieldUtf8Value($fieldName) : string
see

Parameters

$fieldName

Returns

string

Returns the string value of a named field in this document.

getFieldValue($fieldName) : string
see

Parameters

$fieldName

Returns

string

 Properties

 

Field boost factor It's not stored directly in the index, but affects on normalization factor

$boost : float

Default

1.0
 

Associative array Zend_Search_Lucene_Field objects where the keys to the array are the names of the fields.

$_fields : array

Default

array()