public class MappingCharFilterFactory extends CharFilterFactory implements ResourceLoaderAware
MappingCharFilter
.
<fieldType name="text_map" class="solr.TextField" positionIncrementGap="100"> <analyzer> <charFilter class="solr.MappingCharFilterFactory" mapping="mapping.txt"/> <tokenizer class="solr.WhitespaceTokenizerFactory"/> </analyzer> </fieldType>
Modifier and Type | Field and Description |
---|---|
static String |
NAME
SPI name
|
protected NormalizeCharMap |
normMap |
LUCENE_MATCH_VERSION_PARAM, luceneMatchVersion
Constructor and Description |
---|
MappingCharFilterFactory(Map<String,String> args)
Creates a new MappingCharFilterFactory
|
Modifier and Type | Method and Description |
---|---|
Reader |
create(Reader input)
Wraps the given Reader with a CharFilter.
|
void |
inform(ResourceLoader loader)
Initializes this component with the provided ResourceLoader
(used for loading classes, files, etc).
|
Reader |
normalize(Reader input)
Normalize the specified input Reader
While the default implementation returns input unchanged,
char filters that should be applied at normalization time can delegate to
create method. |
protected void |
parseRules(List<String> rules,
NormalizeCharMap.Builder builder) |
protected String |
parseString(String s) |
availableCharFilters, findSPIName, forName, lookupClass, reloadCharFilters
get, get, get, get, get, getBoolean, getChar, getClassArg, getFloat, getInt, getLines, getLuceneMatchVersion, getOriginalArgs, getPattern, getSet, getSnowballWordSet, getWordSet, isExplicitLuceneMatchVersion, require, require, require, requireBoolean, requireChar, requireFloat, requireInt, setExplicitLuceneMatchVersion, splitAt, splitFileNames
public static final String NAME
protected NormalizeCharMap normMap
public void inform(ResourceLoader loader) throws IOException
ResourceLoaderAware
inform
in interface ResourceLoaderAware
IOException
public Reader create(Reader input)
CharFilterFactory
create
in class CharFilterFactory
public Reader normalize(Reader input)
CharFilterFactory
create
method.normalize
in class CharFilterFactory
protected void parseRules(List<String> rules, NormalizeCharMap.Builder builder)
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.