API Documentation

Zend/Search/Lucene/Field.php

Show: inherited
Table of Contents

Zend Framework

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 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Search_Lucene_Field

Package: Zend\Search\Lucene\Document

A field is a section of a Document. 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

Propertypublicfloat  $boost= '1.0'

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

Default value1.0Details
Type
float
Propertypublicstring  $encoding= ''

Field value encoding.

Details
Type
string
Propertypublicboolean  $isBinary= 'false'

Field is stored as binary.

Default valuefalseDetails
Type
boolean
Propertypublicboolean  $isIndexed= 'true'

Field is to be indexed, so that it may be searched on.

Default valuetrueDetails
Type
boolean
Propertypublicboolean  $isStored= 'false'

Field is to be stored in the index for return with search hits.

Default valuefalseDetails
Type
boolean
Propertypublicboolean  $isTokenized= 'true'

Field should be tokenized as text prior to indexing.

Default valuetrueDetails
Type
boolean
Propertypublicstring  $name= ''

Field name

Details
Type
string
Propertypublicboolean  $storeTermVector= 'false'

Field are stored as a term vector

Default valuefalseDetails
Type
boolean
Propertypublicboolean  $value= ''

Field value

Details
Type
boolean

Methods

methodpublic__construct( string $name, string $value, string $encoding, boolean $isStored, boolean $isIndexed, boolean $isTokenized, boolean $isBinary = false ) : void

Object constructor

Parameters
Name Type Description
$name string
$value string
$encoding string
$isStored boolean
$isIndexed boolean
$isTokenized boolean
$isBinary boolean
methodpublicbinary( string $name, string $value ) : \Zend_Search_Lucene_Field
static

Constructs a Binary String valued Field that is not tokenized nor indexed, but is stored in the index, for return with hits.

Parameters
Name Type Description
$name string
$value string
Returns
Type Description
\Zend_Search_Lucene_Field
methodpublicgetUtf8Value( ) : string

Get field value in UTF-8 encoding

Returns
Type Description
string
methodpublickeyword( string $name, string $value, string $encoding = '' ) : \Zend_Search_Lucene_Field
static

Constructs a String-valued Field that is not tokenized, but is indexed and stored. Useful for non-text fields, e.g. date or url.

Parameters
Name Type Description
$name string
$value string
$encoding string
Returns
Type Description
\Zend_Search_Lucene_Field
methodpublictext( string $name, string $value, string $encoding = '' ) : \Zend_Search_Lucene_Field
static

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.

Parameters
Name Type Description
$name string
$value string
$encoding string
Returns
Type Description
\Zend_Search_Lucene_Field
methodpublicunIndexed( string $name, string $value, string $encoding = '' ) : \Zend_Search_Lucene_Field
static

Constructs a String-valued Field that is not tokenized nor indexed, but is stored in the index, for return with hits.

Parameters
Name Type Description
$name string
$value string
$encoding string
Returns
Type Description
\Zend_Search_Lucene_Field
methodpublicunStored( string $name, string $value, string $encoding = '' ) : \Zend_Search_Lucene_Field
static

Constructs a String-valued Field that is tokenized and indexed, but that is not stored in the index.

Parameters
Name Type Description
$name string
$value string
$encoding string
Returns
Type Description
\Zend_Search_Lucene_Field
Documentation was generated by DocBlox 0.15.1.