## Zend_Search_Lucene_Analysis_Analyzer

Description

An Analyzer is used to analyze text.

It thus represents a policy for extracting index terms from text.

Note: Lucene Java implementation is oriented to streams. It provides effective work with a huge documents (more then 20Mb). But engine itself is not oriented such documents. Thus Zend_Search_Lucene analysis API works with data strings and sets (arrays).

- abstract:
- license: New BSD License
- copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Search/Lucene/Analysis/Analyzer.php (line 68)

Direct descendents

Class | Description
--- | ---
Zend_Search_Lucene_Analysis_Analyzer_Common | Common implementation of the Zend_Search_Lucene_Analysis_Analyzer interface.

Variable Summary
string $_encoding
string $_input
Method Summary
static Zend_Search_Lucene_Analysis_Analyzer getDefault ()
static void setDefault (Zend_Search_Lucene_Analysis_Analyzer $analyzer, Zend_Search_Lucene_Analysis_Analyzer $similarity)
Zend_Search_Lucene_Analysis_Token|null nextToken ()
void reset ()
void setInput (string $data, [ $encoding = ''])
array tokenize (string $data, [ $encoding = ''])
Variables
string $_encoding = '' (line 89)

Input string encoding

- access: protected

string $_input = null (line 82)

Input string

- access: protected

Methods
static getDefault (line 161)

Return the default Analyzer implementation used by indexing code.

- access: public

static Zend_Search_Lucene_Analysis_Analyzer getDefault ()
static setDefault (line 150)

Set the default Analyzer implementation used by indexing code.

- access: public

static void setDefault (Zend_Search_Lucene_Analysis_Analyzer $analyzer, Zend_Search_Lucene_Analysis_Analyzer $similarity)

- Zend_Search_Lucene_Analysis_Analyzer $similarity
- Zend_Search_Lucene_Analysis_Analyzer $analyzer

nextToken (line 140)

Tokenization stream API Get next token Returns null at the end of stream

Tokens are returned in UTF-8 (internal Zend_Search_Lucene encoding)

- access: public
- abstract:

Zend_Search_Lucene_Analysis_Token|null nextToken ()

Redefined in descendants as:

- Zend_Search_Lucene_Analysis_Analyzer_Common_Text::nextToken() : Tokenization stream API Get next token Returns null at the end of stream
- Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum::nextToken() : Tokenization stream API Get next token Returns null at the end of stream
- Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8::nextToken() : Tokenization stream API Get next token Returns null at the end of stream
- Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8Num::nextToken() : Tokenization stream API Get next token Returns null at the end of stream

reset (line 129)

Reset token stream

- access: public
- abstract:

void reset ()

Redefined in descendants as:

- Zend_Search_Lucene_Analysis_Analyzer_Common_Text::reset() : Reset token stream
- Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum::reset() : Reset token stream
- Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8::reset() : Reset token stream
- Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8Num::reset() : Reset token stream

setInput (line 119)

Tokenization stream API Set input

- access: public

void setInput (string $data, [ $encoding = ''])

- string $data
- $encoding

tokenize (line 100)

Tokenize text to a terms Returns array of Zend_Search_Lucene_Analysis_Token objects

Tokens are returned in UTF-8 (internal Zend_Search_Lucene encoding)

- access: public

array tokenize (string $data, [ $encoding = ''])

- string $data
- $encoding

Documentation generated on Wed, 21 Feb 2007 11:45:43 -0800 by phpDocumentor 1.3.1