是否可以在Elasticsearch中为常用字词查询定义自己的一组停用词。
我认为它看起来像这样(结合有关过滤器和常用术语查询的文档),但它不起作用:
{
"common": {
"body": {
"query": "this is non english query that requires own stopwords",
"cutoff_frequency": 0.001,
"stopwords": [ "yin", "yang" ] //how would I expect to put them in
}
}
}
任何人都可以为此提供解决方案。提前谢谢。
关于常见术语查询(根本没有提到自定义停用词): http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-common-terms-query.html
为过滤器定义停用词(非常简单): http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/using-stopwords.html