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

入れ子のクラスの概要
protected static class StopTermFilter.TokenProcess
           Means how to process the token.
 
クラス org.apache.lucene.util.AttributeSource から継承された入れ子のクラス/インタフェース
AttributeSource.AttributeFactory, AttributeSource.State
 
フィールドの概要
 
クラス org.apache.lucene.analysis.TokenFilter から継承されたフィールド
input
 
コンストラクタの概要
StopTermFilter(TokenStream in)
           
 
メソッドの概要
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.
 boolean incrementToken()
           
 
クラス org.apache.lucene.analysis.TokenFilter から継承されたメソッド
close, end, reset
 
クラス org.apache.lucene.util.AttributeSource から継承されたメソッド
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
 
クラス java.lang.Object から継承されたメソッド
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

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 array
len - the number of valid characters (length of the term) in the termBuffer array
戻り値:
StopTermFilter.TokenProcess
関連項目:
PositionIncrementAttribute, TypeAttribute


Copyright (C) 2010-2011 Mtzky. AllRights Reserved.