public class Analysis
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Map<java.lang.String,java.util.Set<?>> |
NAMED_STOP_WORDS |
Constructor and Description |
---|
Analysis() |
Modifier and Type | Method and Description |
---|---|
static java.io.Reader |
getReaderFromFile(Environment env,
Settings settings,
java.lang.String settingPrefix) |
static java.util.List<java.lang.String> |
getWordList(Environment env,
Settings settings,
java.lang.String settingPrefix)
Fetches a list of words from the specified settings file.
|
static org.apache.lucene.analysis.CharArraySet |
getWordSet(Environment env,
Settings settings,
java.lang.String settingsPrefix) |
static boolean |
isNoStopwords(Settings settings) |
static java.util.List<java.lang.String> |
loadWordList(java.io.Reader reader,
java.lang.String comment) |
static org.apache.lucene.util.Version |
parseAnalysisVersion(Settings indexSettings,
Settings settings,
org.apache.logging.log4j.Logger logger) |
static org.apache.lucene.analysis.CharArraySet |
parseArticles(Environment env,
Settings settings) |
static org.apache.lucene.analysis.CharArraySet |
parseCommonWords(Environment env,
Settings settings,
org.apache.lucene.analysis.CharArraySet defaultCommonWords,
boolean ignoreCase) |
static org.apache.lucene.analysis.CharArraySet |
parseStemExclusion(Settings settings,
org.apache.lucene.analysis.CharArraySet defaultStemExclusion) |
static org.apache.lucene.analysis.CharArraySet |
parseStopWords(Environment env,
Settings settings,
org.apache.lucene.analysis.CharArraySet defaultStopWords) |
static org.apache.lucene.analysis.CharArraySet |
parseStopWords(Environment env,
Settings settings,
org.apache.lucene.analysis.CharArraySet defaultStopWords,
boolean ignoreCase) |
static org.apache.lucene.analysis.CharArraySet |
parseWords(Environment env,
Settings settings,
java.lang.String name,
org.apache.lucene.analysis.CharArraySet defaultWords,
java.util.Map<java.lang.String,java.util.Set<?>> namedWords,
boolean ignoreCase) |
public static final java.util.Map<java.lang.String,java.util.Set<?>> NAMED_STOP_WORDS
public static org.apache.lucene.util.Version parseAnalysisVersion(Settings indexSettings, Settings settings, org.apache.logging.log4j.Logger logger)
public static boolean isNoStopwords(Settings settings)
public static org.apache.lucene.analysis.CharArraySet parseStemExclusion(Settings settings, org.apache.lucene.analysis.CharArraySet defaultStemExclusion)
public static org.apache.lucene.analysis.CharArraySet parseWords(Environment env, Settings settings, java.lang.String name, org.apache.lucene.analysis.CharArraySet defaultWords, java.util.Map<java.lang.String,java.util.Set<?>> namedWords, boolean ignoreCase)
public static org.apache.lucene.analysis.CharArraySet parseCommonWords(Environment env, Settings settings, org.apache.lucene.analysis.CharArraySet defaultCommonWords, boolean ignoreCase)
public static org.apache.lucene.analysis.CharArraySet parseArticles(Environment env, Settings settings)
public static org.apache.lucene.analysis.CharArraySet parseStopWords(Environment env, Settings settings, org.apache.lucene.analysis.CharArraySet defaultStopWords)
public static org.apache.lucene.analysis.CharArraySet parseStopWords(Environment env, Settings settings, org.apache.lucene.analysis.CharArraySet defaultStopWords, boolean ignoreCase)
public static org.apache.lucene.analysis.CharArraySet getWordSet(Environment env, Settings settings, java.lang.String settingsPrefix)
public static java.util.List<java.lang.String> getWordList(Environment env, Settings settings, java.lang.String settingPrefix)
java.lang.IllegalArgumentException
- If the word list cannot be found at either key.public static java.util.List<java.lang.String> loadWordList(java.io.Reader reader, java.lang.String comment) throws java.io.IOException
java.io.IOException
public static java.io.Reader getReaderFromFile(Environment env, Settings settings, java.lang.String settingPrefix)
null
.java.lang.IllegalArgumentException
- If the Reader can not be instantiated.