A Term represents a word from text. This is the unit of search. It is composed of two elements, the text of the word, as a string, and the name of the field that the text occured in, an interned string.

Note that terms may represent more than words from text fields, but also things like dates, email addresses, urls, etc.

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

 Methods

Object constructor

__construct($text, $field = null

Parameters

$text

$field

Get UTF-8 string length

getLength(string $str) : string
Static

Parameters

$str

string

Returns

string

Get term prefix

getPrefix(string $str, integer $length) : string
Static

Parameters

$str

string

$length

integer

Returns

string

Returns term key

key() : string

Returns

string

 Properties

 

Field name or field number (depending from context)

$field : mixed

Default

 

Term value

$text : string

Default