org.elasticsearch.index.analysis
Class Analysis
java.lang.Object
org.elasticsearch.index.analysis.Analysis
public class Analysis
- extends Object
Method Summary |
static Reader |
getReaderFromFile(Environment env,
Settings settings,
String settingPrefix)
|
static List<String> |
getWordList(Environment env,
Settings settings,
String settingPrefix)
Fetches a list of words from the specified settings file. |
static org.apache.lucene.analysis.CharArraySet |
getWordSet(Environment env,
Settings settings,
String settingsPrefix,
org.apache.lucene.util.Version version)
|
static boolean |
isNoStopwords(Settings settings)
|
static List<String> |
loadWordList(Reader reader,
String comment)
|
static Set<?> |
parseArticles(Environment env,
Settings settings,
org.apache.lucene.util.Version version)
|
static Set<?> |
parseStemExclusion(Settings settings,
Set<?> defaultStemExclusion)
|
static Set<?> |
parseStopWords(Environment env,
Settings settings,
Set<?> defaultStopWords,
org.apache.lucene.util.Version version)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
namedStopWords
public static final com.google.common.collect.ImmutableMap<String,Set<?>> namedStopWords
Analysis
public Analysis()
isNoStopwords
public static boolean isNoStopwords(Settings settings)
parseStemExclusion
public static Set<?> parseStemExclusion(Settings settings,
Set<?> defaultStemExclusion)
parseArticles
public static Set<?> parseArticles(Environment env,
Settings settings,
org.apache.lucene.util.Version version)
parseStopWords
public static Set<?> parseStopWords(Environment env,
Settings settings,
Set<?> defaultStopWords,
org.apache.lucene.util.Version version)
getWordSet
public static org.apache.lucene.analysis.CharArraySet getWordSet(Environment env,
Settings settings,
String settingsPrefix,
org.apache.lucene.util.Version version)
getWordList
public static List<String> getWordList(Environment env,
Settings settings,
String settingPrefix)
- Fetches a list of words from the specified settings file. The list should either be available at the key
specified by settingsPrefix or in a file specified by settingsPrefix + _path.
- Throws:
ElasticSearchIllegalArgumentException
- If the word list cannot be found at either key.
loadWordList
public static List<String> loadWordList(Reader reader,
String comment)
throws IOException
- Throws:
IOException
getReaderFromFile
public static Reader getReaderFromFile(Environment env,
Settings settings,
String settingPrefix)
- Returns:
- null If no settings set for "settingsPrefix" then return
null
.
- Throws:
ElasticSearchIllegalArgumentException
- If the Reader can not be instantiated.
Copyright © 2009-2012. All Rights Reserved.