Class Analysis

java.lang.Object
org.elasticsearch.index.analysis.Analysis

public class Analysis extends Object
  • Field Details

    • NAMED_STOP_WORDS

      public static final Map<String,Set<?>> NAMED_STOP_WORDS
  • Constructor Details

    • Analysis

      public Analysis()
  • Method Details

    • checkForDeprecatedVersion

      public static void checkForDeprecatedVersion(String name, Settings settings)
    • parseStemExclusion

      public static org.apache.lucene.analysis.CharArraySet parseStemExclusion(Settings settings, org.apache.lucene.analysis.CharArraySet defaultStemExclusion)
    • parseWords

      public static org.apache.lucene.analysis.CharArraySet parseWords(Environment env, Settings settings, String name, org.apache.lucene.analysis.CharArraySet defaultWords, Map<String,Set<?>> namedWords, boolean ignoreCase)
    • parseCommonWords

      public static org.apache.lucene.analysis.CharArraySet parseCommonWords(Environment env, Settings settings, org.apache.lucene.analysis.CharArraySet defaultCommonWords, boolean ignoreCase)
    • parseArticles

      public static org.apache.lucene.analysis.CharArraySet parseArticles(Environment env, Settings settings)
    • parseStopWords

      public static org.apache.lucene.analysis.CharArraySet parseStopWords(Environment env, Settings settings, org.apache.lucene.analysis.CharArraySet defaultStopWords)
    • parseStopWords

      public static org.apache.lucene.analysis.CharArraySet parseStopWords(Environment env, Settings settings, org.apache.lucene.analysis.CharArraySet defaultStopWords, boolean ignoreCase)
    • getWordSet

      public static org.apache.lucene.analysis.CharArraySet getWordSet(Environment env, Settings settings, String settingsPrefix)
    • 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:
      IllegalArgumentException - If the word list cannot be found at either key.
    • getWordList

      public static List<String> getWordList(Environment env, Settings settings, String settingPath, String settingList, boolean removeComments)
      Fetches a list of words from the specified settings file. The list should either be available at the key specified by settingList or in a file specified by settingPath.
      Throws:
      IllegalArgumentException - If the word list cannot be found at either key.
    • getReaderFromFile

      public static Reader getReaderFromFile(Environment env, Settings settings, String settingPrefix)
      Returns:
      null If no settings set for "settingsPrefix" then return null.
      Throws:
      IllegalArgumentException - If the Reader can not be instantiated.