public class WildcardFilter
extends org.apache.lucene.analysis.TokenFilter
It can be difficult to do wild card search over a stemmed index - for example 'feature' will be stemmed to feature and if you search for 'feature*' you will not match 'feature'. To search for 'feature*' then stem first and then wildcard.
The need for this was highlighted by (JRA-19918)
This filter stems and then appends the wildcard to each existing token, so it makes no sense for it not to be the final filter in the chain. note that the query returned will actually not work (it will look for the litral * as it is a term query - use the query to get the text and then search)
Modifier and Type | Field and Description |
---|---|
static char |
WILDCARD_OPERATOR
Wildcrad character: U+002A (ASTERISK)
|
Constructor and Description |
---|
WildcardFilter(org.apache.lucene.analysis.TokenStream in) |
Modifier and Type | Method and Description |
---|---|
boolean |
incrementToken() |
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
public static final char WILDCARD_OPERATOR
public final boolean incrementToken() throws IOException
incrementToken
in class org.apache.lucene.analysis.TokenStream
IOException
Copyright © 2002-2016 Atlassian. All Rights Reserved.