elasticsearch.yml中定义的过滤器不起作用

时间:2016-10-11 07:46:30

标签: elasticsearch

我尝试在elasticsearch.yml中定义自定义过滤器,如下所示,然后重新启动节点:

index:
  analysis:
    filter: 
      myTokenFilter2:
        type: length
        min: 2
        max: 5

并尝试使用它。

curl -XPOST localhost:9200/_analyze?tokenizer=standard&filters=myTokenFilter2 -d "a aa aaaa aaaaaa",

只能在响应中找到这个json

{
  "error": {
    "root_cause": [
      {
        "type": "remote_transport_exception",
        "reason": "[Domina][127.0.0.1:9300][indices:admin/analyze[s]]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "failed to find global token filter under [myTokenFilter2]"
  },
  "status": 400
}

我的配置有什么问题?谢谢

0 个答案:

没有答案