org.mtzky.lucene.filter
クラス StopTermFilter
java.lang.Object
org.apache.lucene.util.AttributeSource
org.apache.lucene.analysis.TokenStream
org.apache.lucene.analysis.TokenFilter
org.mtzky.lucene.filter.StopTermFilter
- すべての実装されたインタフェース:
- Closeable
public abstract class StopTermFilter
- extends TokenFilter
Removes stop term from a token stream. Override
contains(char[], int) to remove stop term.
- 作成者:
- mtzky
- 関連項目:
LowerCaseFilter
| クラス org.apache.lucene.util.AttributeSource から継承されたメソッド |
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString |
StopTermFilter
public StopTermFilter(TokenStream in)
- パラメータ:
in -
incrementToken
public boolean incrementToken()
throws IOException
- 定義:
- クラス
TokenStream 内の incrementToken
- 例外:
IOException
contains
protected abstract StopTermFilter.TokenProcess contains(char[] term,
int len)
Returns StopTermFilter.TokenProcess.IGNORE and
StopTermFilter.TokenProcess.IGNORE_KEEP_POSITION if skips a term, or
StopTermFilter.TokenProcess.KEEP.
In most cases, you should return StopTermFilter.TokenProcess.IGNORE because it
does not lose information (positions of the original tokens) during
indexing. If you return StopTermFilter.TokenProcess.IGNORE_KEEP_POSITION, the
position is NOT incremented. For
example, it is useful to skip IVS token.
- パラメータ:
term - the internal termBuffer character arraylen - the number of valid characters (length of the term) in the
termBuffer array
- 戻り値:
StopTermFilter.TokenProcess- 関連項目:
PositionIncrementAttribute,
TypeAttribute
Copyright (C) 2010-2011 Mtzky. AllRights Reserved.