Search/Lucene/Analysis/Analyzer/Common.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
- Analysis
- Version
- $Id: Common.php 24847 2012-05-31 19:19:28Z rob $
Constants
\Zend_Search_Lucene_Analysis_Analyzer_Common
There are several standard standard subclasses provided by Zend_Search_Lucene/Analysis subpackage: Zend_Search_Lucene_Analysis_Analyzer_Common_Text, ZSearchHTMLAnalyzer, ZSearchXMLAnalyzer.
- Parent(s)
- \Zend_Search_Lucene_Analysis_Analyzer
- Children
- \Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8Num
- \Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum
- \Zend_Search_Lucene_Analysis_Analyzer_Common_Text
- \Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Todo
- ZSearchHTMLAnalyzer and ZSearchXMLAnalyzer implementation
Properties


\Zend_Search_Lucene_Analysis_Analyzer $_defaultImpl


string $_encoding = ''
''
Details- Type
- string
- Inherited_from
- \Zend_Search_Lucene_Analysis_Analyzer::$$_encoding


array $_filters = array()
Array of Zend_Search_Lucene_Analysis_TokenFilter objects.
array()
Details- Type
- array


string $_input = null
null
Details- Type
- string
- Inherited_from
- \Zend_Search_Lucene_Analysis_Analyzer::$$_input
Methods


addFilter(\Zend_Search_Lucene_Analysis_TokenFilter $filter) : void
Add Token filter to the Analyzer
Name | Type | Description |
---|---|---|
$filter | \Zend_Search_Lucene_Analysis_TokenFilter |


getDefault() : \Zend_Search_Lucene_Analysis_Analyzer
Return the default Analyzer implementation used by indexing code.
Inherited from: \Zend_Search_Lucene_Analysis_Analyzer::getDefault()Type | Description |
---|---|
\Zend_Search_Lucene_Analysis_Analyzer |


nextToken() : \Zend_Search_Lucene_Analysis_Token | null
Tokenization stream API Get next token Returns null at the end of stream
Inherited from: \Zend_Search_Lucene_Analysis_Analyzer::nextToken()Tokens are returned in UTF-8 (internal Zend_Search_Lucene encoding)
Type | Description |
---|---|
\Zend_Search_Lucene_Analysis_Token | null |


normalize(\Zend_Search_Lucene_Analysis_Token $token) : \Zend_Search_Lucene_Analysis_Token
Apply filters to the token.
Can return null when the token was removed.
Name | Type | Description |
---|---|---|
$token | \Zend_Search_Lucene_Analysis_Token |
Type | Description |
---|---|
\Zend_Search_Lucene_Analysis_Token |


setDefault( $analyzer) : void
Set the default Analyzer implementation used by indexing code.
Inherited from: \Zend_Search_Lucene_Analysis_Analyzer::setDefault()Name | Type | Description |
---|---|---|
$analyzer |


setInput(string $data, $encoding = '') : void
Tokenization stream API Set input
Inherited from: \Zend_Search_Lucene_Analysis_Analyzer::setInput()Name | Type | Description |
---|---|---|
$data | string | |
$encoding |


tokenize(string $data, $encoding = '') : array
Tokenize text to a terms Returns array of Zend_Search_Lucene_Analysis_Token objects
Inherited from: \Zend_Search_Lucene_Analysis_Analyzer::tokenize()Tokens are returned in UTF-8 (internal Zend_Search_Lucene encoding)
Name | Type | Description |
---|---|---|
$data | string | |
$encoding |
Type | Description |
---|---|
array |