\Zend_Search_Lucene_Field
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.
- Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
- License: http://framework.zend.com/license/new-bsd New BSD License
Synopsis
class Zend_Search_Lucene_Field
{
- // members
- public $name;
- public $value;
- public boolean $isStored = false;
- public boolean $isIndexed = true;
- public boolean $isTokenized = true;
- public boolean $isBinary = false;
- public boolean $storeTermVector = false;
- public float $boost = 1.0;
- public $encoding;
- // methods
- public void __construct()
- public static Zend_Search_Lucene_Field keyword()
- public static Zend_Search_Lucene_Field unIndexed()
- public static Zend_Search_Lucene_Field binary()
- public static Zend_Search_Lucene_Field text()
- public static Zend_Search_Lucene_Field unStored()
- public string getUtf8Value()
Members
public
- $boost
—
float
Field boost factor It's not stored directly in the index, but affects on normalization factor - $encoding
—
string
Field value encoding. - $isBinary
—
boolean
Field is stored as binary. - $isIndexed
—
boolean
Field is to be indexed, so that it may be searched on. - $isStored
—
boolean
Field is to be stored in the index for return with search hits. - $isTokenized
—
boolean
Field should be tokenized as text prior to indexing. - $name
—
string
Field name - $storeTermVector
—
boolean
Field are stored as a term vector - $value
—
boolean
Field value
Methods
public
- __construct() — Object constructor
- binary() — Constructs a Binary String valued Field that is not tokenized nor indexed, but is stored in the index, for return with hits.
- getUtf8Value() — Get field value in UTF-8 encoding
- keyword() — Constructs a String-valued Field that is not tokenized, but is indexed and stored. Useful for non-text fields, e.g. date or url.
- text() — 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.
- unIndexed() — Constructs a String-valued Field that is not tokenized nor indexed, but is stored in the index, for return with hits.
- unStored() — Constructs a String-valued Field that is tokenized and indexed, but that is not stored in the index.