| java.lang.Object |
| ↳ |
org.apache.lucene.util.AttributeSource |
| |
↳ |
org.apache.lucene.analysis.TokenStream |
| |
|
↳ |
org.apache.lucene.analysis.TokenFilter |
| |
|
|
↳ |
com.atlassian.confluence.search.lucene.filter.ConfluenceNGramTokenFilter |
Class Overview
Token filter that returns n-grams from the input (excluding start grams).
Summary
| Nested Classes |
|
interface |
ConfluenceNGramTokenFilter.Callback |
Callback interface to allow filtering on n-gram tokens
|
|
[Expand]
Inherited Fields |
From class
org.apache.lucene.analysis.TokenFilter
|
protected
final
TokenStream |
input |
|
|
| Public Methods |
|
final
Token
|
next()
Returns the next token in the stream, or null at EOS.
|
|
[Expand]
Inherited Methods |
From class
org.apache.lucene.analysis.TokenFilter
|
void
|
close()
|
|
void
|
end()
|
|
void
|
reset()
|
|
From class
org.apache.lucene.analysis.TokenStream
|
void
|
close()
|
|
void
|
end()
|
|
static
boolean
|
getOnlyUseNewAPI()
|
|
boolean
|
incrementToken()
|
|
Token
|
next(Token arg0)
|
|
Token
|
next()
|
|
void
|
reset()
|
|
static
void
|
setOnlyUseNewAPI(boolean arg0)
|
|
From class
org.apache.lucene.util.AttributeSource
|
Attribute
|
addAttribute(Class arg0)
|
|
void
|
addAttributeImpl(AttributeImpl arg0)
|
|
AttributeSource.State
|
captureState()
|
|
void
|
clearAttributes()
|
|
AttributeSource
|
cloneAttributes()
|
|
boolean
|
equals(Object arg0)
|
|
Attribute
|
getAttribute(Class arg0)
|
|
Iterator
|
getAttributeClassesIterator()
|
|
AttributeSource.AttributeFactory
|
getAttributeFactory()
|
|
Iterator
|
getAttributeImplsIterator()
|
|
boolean
|
hasAttribute(Class arg0)
|
|
boolean
|
hasAttributes()
|
|
int
|
hashCode()
|
|
void
|
restoreState(AttributeSource.State arg0)
|
|
String
|
toString()
|
|
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
Constants
public
static
final
int
DEFAULT_MAX_NGRAM_SIZE
Constant Value:
2
(0x00000002)
public
static
final
int
DEFAULT_MIN_NGRAM_SIZE
Constant Value:
1
(0x00000001)
Fields
Public Constructors
public
ConfluenceNGramTokenFilter
(TokenStream input, int minGram, int maxGram, ConfluenceNGramTokenFilter.Callback callback)
Creates NGramTokenFilter with given min and max n-grams.
Parameters
| input
| TokenStream holding the input to be tokenized |
| minGram
| the smallest n-gram to generate |
| maxGram
| the largest n-gram to generate |
| callback
| this is called before a n-gram token is added
|
Creates NGramTokenFilter with default min and max n-grams.
Parameters
| input
| TokenStream holding the input to be tokenized |
| callback
| this is called before a n-gram token is added
|
Public Methods
public
final
Token
next
()
Returns the next token in the stream, or null at EOS.