Document
in package
A Document is a set of fields. Each field has a name and a textual value.
Tags
Table of Contents
Properties
- $boost : float
- Field boost factor It's not stored directly in the index, but affects on normalization factor
- $_fields : array<string|int, mixed>
- Associative array \ZendSearch\Lucene\Document\Field objects where the keys to the array are the names of the fields.
Methods
- __get() : string
- Proxy method for getFieldValue(), provides more convenient access to the string value of a field.
- __isset() : bool
- Magic method for checking the existence of a field
- addField() : Document
- Add a field object to this document.
- getField() : Field
- Returns {@link \ZendSearch\Lucene\Document\Field} object for a named field in this document.
- getFieldNames() : array<string|int, mixed>
- Return an array with the names of the fields in this document.
- getFieldUtf8Value() : string
- Returns the string value of a named field in UTF-8 encoding.
- getFieldValue() : string
- Returns the string value of a named field in this document.
Properties
$boost
Field boost factor It's not stored directly in the index, but affects on normalization factor
public
float
$boost
= 1.0
$_fields
Associative array \ZendSearch\Lucene\Document\Field objects where the keys to the array are the names of the fields.
protected
array<string|int, mixed>
$_fields
= array()
Methods
__get()
Proxy method for getFieldValue(), provides more convenient access to the string value of a field.
public
__get(mixed $offset) : string
Parameters
- $offset : mixed
Return values
string__isset()
Magic method for checking the existence of a field
public
__isset(string $offset) : bool
Parameters
- $offset : string
Return values
bool —TRUE if the field exists else FALSE
addField()
Add a field object to this document.
public
addField(Field $field) : Document
Parameters
- $field : Field
Return values
DocumentgetField()
Returns {@link \ZendSearch\Lucene\Document\Field} object for a named field in this document.
public
getField(string $fieldName) : Field
Parameters
- $fieldName : string
Tags
Return values
FieldgetFieldNames()
Return an array with the names of the fields in this document.
public
getFieldNames() : array<string|int, mixed>
Return values
array<string|int, mixed>getFieldUtf8Value()
Returns the string value of a named field in UTF-8 encoding.
public
getFieldUtf8Value(string $fieldName) : string
Parameters
- $fieldName : string
Tags
Return values
stringgetFieldValue()
Returns the string value of a named field in this document.
public
getFieldValue(string $fieldName) : string
Parameters
- $fieldName : string