ElasticSearch:英文停用词列表

时间:2018-07-11 12:38:07

标签: elasticsearch

在哪里可以找到当我们选择_english_作为Stop Token Filter文档中提到的语言时使用的ElasticSearch 6.3中的停用词的最新列表。

1 个答案:

答案 0 :(得分:0)

Elasticsearch为此使用了Lucene默认值。直到大约一周前,它一直位于https://github.com/apache/lucene-solr/blob/branch_7x/lucene/core/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java#L47-L53中。

现在它已移至https://github.com/apache/lucene-solr/blob/master/lucene/analysis/common/src/java/org/apache/lucene/analysis/en/EnglishAnalyzer.java#L44-L50,但列表相同:

final List<String> stopWords = Arrays.asList(
    "a", "an", "and", "are", "as", "at", "be", "but", "by",
    "for", "if", "in", "into", "is", "it",
    "no", "not", "of", "on", "or", "such",
    "that", "the", "their", "then", "there", "these",
    "they", "this", "to", "was", "will", "with"
);