Search/Lucene/Field.php
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Search_Lucene
- Subpackage
- Document
- Version
- $Id: Field.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Search_Lucene_Field
Each field has two parts, a name and a value. Values may be free text or they may be atomic keywords, which are not further processed. Such keywords may be used to represent dates, urls, etc. Fields are optionally stored in the index, so that they may be returned with hits on the document.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties


float $boost = 1.0
1.0
Details- Type
- float


boolean $isIndexed = true
true
Details- Type
- boolean


boolean $isStored = false
false
Details- Type
- boolean


boolean $isTokenized = true
true
Details- Type
- boolean


boolean $storeTermVector = false
false
Details- Type
- boolean
Methods


__construct(string $name, string $value, string $encoding, boolean $isStored, boolean $isIndexed, boolean $isTokenized, boolean $isBinary = false) : void
Object constructor
Name | Type | Description |
---|---|---|
$name | string | |
$value | string | |
$encoding | string | |
$isStored | boolean | |
$isIndexed | boolean | |
$isTokenized | boolean | |
$isBinary | boolean |


binary(string $name, string $value) : \Zend_Search_Lucene_Field
Constructs a Binary String valued Field that is not tokenized nor indexed, but is stored in the index, for return with hits.
Name | Type | Description |
---|---|---|
$name | string | |
$value | string |
Type | Description |
---|---|
\Zend_Search_Lucene_Field |


keyword(string $name, string $value, string $encoding = '') : \Zend_Search_Lucene_Field
Constructs a String-valued Field that is not tokenized, but is indexed and stored.
Useful for non-text fields, e.g. date or url.
Name | Type | Description |
---|---|---|
$name | string | |
$value | string | |
$encoding | string |
Type | Description |
---|---|
\Zend_Search_Lucene_Field |


text(string $name, string $value, string $encoding = '') : \Zend_Search_Lucene_Field
Constructs a String-valued Field that is tokenized and indexed, and is stored in the index, for return with hits.
Useful for short text fields, like "title" or "subject". Term vector will not be stored for this field.
Name | Type | Description |
---|---|---|
$name | string | |
$value | string | |
$encoding | string |
Type | Description |
---|---|
\Zend_Search_Lucene_Field |


unIndexed(string $name, string $value, string $encoding = '') : \Zend_Search_Lucene_Field
Constructs a String-valued Field that is not tokenized nor indexed, but is stored in the index, for return with hits.
Name | Type | Description |
---|---|---|
$name | string | |
$value | string | |
$encoding | string |
Type | Description |
---|---|
\Zend_Search_Lucene_Field |


unStored(string $name, string $value, string $encoding = '') : \Zend_Search_Lucene_Field
Constructs a String-valued Field that is tokenized and indexed, but that is not stored in the index.
Name | Type | Description |
---|---|---|
$name | string | |
$value | string | |
$encoding | string |
Type | Description |
---|---|
\Zend_Search_Lucene_Field |