org.apache.solr.analysis
Class TrieTokenizerFactory
java.lang.Object
org.apache.solr.analysis.BaseTokenizerFactory
org.apache.solr.analysis.TrieTokenizerFactory
- All Implemented Interfaces:
- TokenizerFactory
public class TrieTokenizerFactory
- extends BaseTokenizerFactory
Tokenizer for trie fields. It uses NumericTokenStream to create multiple trie encoded string per number.
Each string created by this tokenizer for a given number differs from the previous by the given precisionStep.
For query time token streams that only contain the highest precision term, use 32/64 as precisionStep.
Refer to NumericRangeQuery
for more details.
- Since:
- solr 1.4
- Version:
- $Id: TrieTokenizerFactory.java 1061000 2011-01-19 21:29:17Z uschindler $
- See Also:
NumericRangeQuery
,
TrieField
Method Summary |
protected void |
assureMatchVersion()
this method can be called in the TokenizerFactory.create(java.io.Reader)
or TokenFilterFactory.create(org.apache.lucene.analysis.TokenStream) methods,
to inform user, that for this factory a luceneMatchVersion is required |
org.apache.solr.analysis.TrieTokenizer |
create(Reader input)
Creates a TokenStream of the specified input |
Map<String,String> |
getArgs()
|
protected boolean |
getBoolean(String name,
boolean defaultVal)
|
protected boolean |
getBoolean(String name,
boolean defaultVal,
boolean useDefault)
|
protected int |
getInt(String name)
|
protected int |
getInt(String name,
int defaultVal)
|
protected int |
getInt(String name,
int defaultVal,
boolean useDefault)
|
protected org.apache.lucene.analysis.CharArraySet |
getWordSet(ResourceLoader loader,
String wordFiles,
boolean ignoreCase)
|
void |
init(Map<String,String> args)
|
protected void |
warnDeprecated(String message)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
precisionStep
protected final int precisionStep
type
protected final TrieField.TrieTypes type
args
protected Map<String,String> args
- The init args
luceneMatchVersion
protected org.apache.lucene.util.Version luceneMatchVersion
- the luceneVersion arg
TrieTokenizerFactory
public TrieTokenizerFactory(TrieField.TrieTypes type,
int precisionStep)
create
public org.apache.solr.analysis.TrieTokenizer create(Reader input)
- Description copied from interface:
TokenizerFactory
- Creates a TokenStream of the specified input
init
public void init(Map<String,String> args)
getArgs
public Map<String,String> getArgs()
assureMatchVersion
protected final void assureMatchVersion()
- this method can be called in the
TokenizerFactory.create(java.io.Reader)
or TokenFilterFactory.create(org.apache.lucene.analysis.TokenStream)
methods,
to inform user, that for this factory a luceneMatchVersion
is required
warnDeprecated
protected final void warnDeprecated(String message)
getInt
protected int getInt(String name)
getInt
protected int getInt(String name,
int defaultVal)
getInt
protected int getInt(String name,
int defaultVal,
boolean useDefault)
getBoolean
protected boolean getBoolean(String name,
boolean defaultVal)
getBoolean
protected boolean getBoolean(String name,
boolean defaultVal,
boolean useDefault)
getWordSet
protected org.apache.lucene.analysis.CharArraySet getWordSet(ResourceLoader loader,
String wordFiles,
boolean ignoreCase)
throws IOException
- Throws:
IOException
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.