public class CommonGramsQueryFilterFactory extends BaseTokenFilterFactory implements ResourceLoaderAware
CommonGramsQueryFilter
.
This is pretty close to a straight copy from StopFilterFactory
.
<fieldType name="text_cmmngrmsqry" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.CommonGramsQueryFilterFactory" words="commongramsquerystopwords.txt" ignoreCase="false"/> </analyzer> </fieldType>
Modifier and Type | Field and Description |
---|---|
private org.apache.lucene.analysis.CharArraySet |
commonWords |
private boolean |
ignoreCase |
log
args, luceneMatchVersion
Constructor and Description |
---|
CommonGramsQueryFilterFactory() |
Modifier and Type | Method and Description |
---|---|
CommonGramsQueryFilter |
create(org.apache.lucene.analysis.TokenStream input)
Create a CommonGramsFilter and wrap it with a CommonGramsQueryFilter
|
java.util.Set<?> |
getCommonWords() |
void |
inform(ResourceLoader loader) |
void |
init(java.util.Map<java.lang.String,java.lang.String> args)
init will be called just once, immediately after creation. |
boolean |
isIgnoreCase() |
assureMatchVersion, getArgs, getBoolean, getBoolean, getInt, getInt, getInt, getSnowballWordSet, getWordSet, warnDeprecated
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getArgs
private org.apache.lucene.analysis.CharArraySet commonWords
private boolean ignoreCase
public void init(java.util.Map<java.lang.String,java.lang.String> args)
TokenFilterFactory
init
will be called just once, immediately after creation.
The args are user-level initialization parameters that may be specified when declaring the factory in the schema.xml
init
in interface TokenFilterFactory
init
in class BaseTokenStreamFactory
public void inform(ResourceLoader loader)
inform
in interface ResourceLoaderAware
public boolean isIgnoreCase()
public java.util.Set<?> getCommonWords()
public CommonGramsQueryFilter create(org.apache.lucene.analysis.TokenStream input)
create
in interface TokenFilterFactory