public class PositionFilterFactory extends BaseTokenFilterFactory
PositionFilter
.
Set the positionIncrement of all tokens to the "positionIncrement", except the first return token which retains its
original positionIncrement value. The default positionIncrement value is zero.
<fieldType name="text_position" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.PositionFilterFactory" positionIncrement="0"/> </analyzer> </fieldType>
PositionFilter
Modifier and Type | Field and Description |
---|---|
private int |
positionIncrement |
log
args, luceneMatchVersion
Constructor and Description |
---|
PositionFilterFactory() |
Modifier and Type | Method and Description |
---|---|
org.apache.lucene.analysis.position.PositionFilter |
create(org.apache.lucene.analysis.TokenStream input)
Transform the specified input TokenStream
|
void |
init(java.util.Map<java.lang.String,java.lang.String> args)
init will be called just once, immediately after creation. |
assureMatchVersion, getArgs, getBoolean, getBoolean, getInt, getInt, getInt, getSnowballWordSet, getWordSet, warnDeprecated
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getArgs
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 org.apache.lucene.analysis.position.PositionFilter create(org.apache.lucene.analysis.TokenStream input)
TokenFilterFactory