public final class

LengthFilter

extends TokenFilter
java.lang.Object
   ↳ org.apache.lucene.util.AttributeSource
     ↳ org.apache.lucene.analysis.TokenStream
       ↳ org.apache.lucene.analysis.TokenFilter
         ↳ org.apache.lucene.analysis.LengthFilter

Class Overview

Removes words that are too long or too short from the stream.

Summary

[Expand]
Inherited Fields
From class org.apache.lucene.analysis.TokenFilter
Public Constructors
LengthFilter(TokenStream in, int min, int max)
Build a filter that removes words that are too long or too short from the text.
Public Methods
final boolean incrementToken()
Returns the next input Token whose term() is the right len
[Expand]
Inherited Methods
From class org.apache.lucene.analysis.TokenFilter
From class org.apache.lucene.analysis.TokenStream
From class org.apache.lucene.util.AttributeSource
From class java.lang.Object
From interface java.io.Closeable

Public Constructors

public LengthFilter (TokenStream in, int min, int max)

Build a filter that removes words that are too long or too short from the text.

Public Methods

public final boolean incrementToken ()

Returns the next input Token whose term() is the right len

Returns
  • false for end of stream; true otherwise
Throws
IOException