org.elasticsearch.index.analysis.Analysis.parseStopWords()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(10.0k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中org.elasticsearch.index.analysis.Analysis.parseStopWords()方法的一些代码示例,展示了Analysis.parseStopWords()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Analysis.parseStopWords()方法的具体详情如下:
包路径:org.elasticsearch.index.analysis.Analysis
类名称:Analysis
方法名:parseStopWords

Analysis.parseStopWords介绍

暂无

代码示例

代码示例来源:origin: org.elasticsearch/elasticsearch

public StopAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  CharArraySet stopWords = Analysis.parseStopWords(
    env, indexSettings.getIndexVersionCreated(), settings, StopAnalyzer.ENGLISH_STOP_WORDS_SET);
  this.stopAnalyzer = new StopAnalyzer(stopWords);
  this.stopAnalyzer.setVersion(version);
}

代码示例来源:origin: org.elasticsearch/elasticsearch

public StopTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  this.ignoreCase =
    settings.getAsBooleanLenientForPreEs6Indices(indexSettings.getIndexVersionCreated(), "ignore_case", false, deprecationLogger);
  this.removeTrailing = settings.getAsBooleanLenientForPreEs6Indices(
    indexSettings.getIndexVersionCreated(), "remove_trailing", true, deprecationLogger);
  this.stopWords = Analysis.parseStopWords(env, settings, StopAnalyzer.ENGLISH_STOP_WORDS_SET, ignoreCase);
  if (settings.get("enable_position_increments") != null) {
    throw new IllegalArgumentException("enable_position_increments is not supported anymore. Please fix your analysis chain");
  }
}

代码示例来源:origin: org.elasticsearch/elasticsearch

public StandardAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  final CharArraySet defaultStopwords = CharArraySet.EMPTY_SET;
  CharArraySet stopWords = Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, defaultStopwords);
  int maxTokenLength = settings.getAsInt("max_token_length", StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH);
  standardAnalyzer = new StandardAnalyzer(stopWords);
  standardAnalyzer.setVersion(version);
  standardAnalyzer.setMaxTokenLength(maxTokenLength);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

StandardHtmlStripAnalyzerProvider(IndexSettings indexSettings, Environment env,  String name, Settings settings) {
  super(indexSettings, name, settings);
  final CharArraySet defaultStopwords = CharArraySet.EMPTY_SET;
  CharArraySet stopWords = Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, defaultStopwords);
  analyzer = new StandardHtmlStripAnalyzer(stopWords);
  analyzer.setVersion(version);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public StopTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  this.ignoreCase =
    settings.getAsBooleanLenientForPreEs6Indices(indexSettings.getIndexVersionCreated(), "ignore_case", false, deprecationLogger);
  this.removeTrailing = settings.getAsBooleanLenientForPreEs6Indices(
    indexSettings.getIndexVersionCreated(), "remove_trailing", true, deprecationLogger);
  this.stopWords = Analysis.parseStopWords(env, settings, StopAnalyzer.ENGLISH_STOP_WORDS_SET, ignoreCase);
  if (settings.get("enable_position_increments") != null) {
    throw new IllegalArgumentException("enable_position_increments is not supported anymore. Please fix your analysis chain");
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public StandardAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  final CharArraySet defaultStopwords = CharArraySet.EMPTY_SET;
  CharArraySet stopWords = Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, defaultStopwords);
  int maxTokenLength = settings.getAsInt("max_token_length", StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH);
  standardAnalyzer = new StandardAnalyzer(stopWords);
  standardAnalyzer.setVersion(version);
  standardAnalyzer.setMaxTokenLength(maxTokenLength);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

ThaiAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  analyzer = new ThaiAnalyzer(
    Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, ThaiAnalyzer.getDefaultStopSet()));
  analyzer.setVersion(version);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

GreekAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  analyzer = new GreekAnalyzer(
    Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, GreekAnalyzer.getDefaultStopSet()));
  analyzer.setVersion(version);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

PersianAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  analyzer = new PersianAnalyzer(
    Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, PersianAnalyzer.getDefaultStopSet()));
  analyzer.setVersion(version);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

CjkAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  CharArraySet stopWords = Analysis.parseStopWords(
    env, indexSettings.getIndexVersionCreated(), settings, CJKAnalyzer.getDefaultStopSet());
  analyzer = new CJKAnalyzer(stopWords);
  analyzer.setVersion(version);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

SnowballAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  String language = settings.get("language", settings.get("name", "English"));
  CharArraySet defaultStopwords = DEFAULT_LANGUAGE_STOPWORDS.getOrDefault(language, CharArraySet.EMPTY_SET);
  CharArraySet stopWords = Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, defaultStopwords);
  analyzer = new SnowballAnalyzer(language, stopWords);
  analyzer.setVersion(version);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

HindiAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  analyzer = new HindiAnalyzer(
    Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, HindiAnalyzer.getDefaultStopSet()),
    Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
  );
  analyzer.setVersion(version);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

DutchAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  analyzer = new DutchAnalyzer(
    Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, DutchAnalyzer.getDefaultStopSet()),
    Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
  );
  analyzer.setVersion(version);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

CzechAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  analyzer = new CzechAnalyzer(
    Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, CzechAnalyzer.getDefaultStopSet()),
    Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
  );
  analyzer.setVersion(version);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

FingerprintAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  char separator = parseSeparator(settings);
  int maxOutputSize = settings.getAsInt(MAX_OUTPUT_SIZE.getPreferredName(),DEFAULT_MAX_OUTPUT_SIZE);
  CharArraySet stopWords = Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, DEFAULT_STOP_WORDS);
  this.analyzer = new FingerprintAnalyzer(stopWords, separator, maxOutputSize);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

SpanishAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  analyzer = new SpanishAnalyzer(
    Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, SpanishAnalyzer.getDefaultStopSet()),
    Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
  );
  analyzer.setVersion(version);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

GalicianAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  analyzer = new GalicianAnalyzer(
    Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, GalicianAnalyzer.getDefaultStopSet()),
    Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
  );
  analyzer.setVersion(version);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

IrishAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  analyzer = new IrishAnalyzer(
    Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, IrishAnalyzer.getDefaultStopSet()),
    Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
  );
  analyzer.setVersion(version);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

LithuanianAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  analyzer = new LithuanianAnalyzer(
    Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, LithuanianAnalyzer.getDefaultStopSet()),
    Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
  );
  analyzer.setVersion(version);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

ArabicAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) {
  super(indexSettings, name, settings);
  arabicAnalyzer = new ArabicAnalyzer(
    Analysis.parseStopWords(env, indexSettings.getIndexVersionCreated(), settings, ArabicAnalyzer.getDefaultStopSet()),
    Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET)
  );
  arabicAnalyzer.setVersion(version);
}

相关文章