elasticsearch not_analyzed 不工作

elasticsearch not_analyzed doesn't work

为什么弹性搜索not_analyzed不起作用我正在尝试解决

映射在此处可见:http://i.stack.imgur.com/dGj7A.png

curl -XGET 'http://localhost:9200/gb/_analyze?field=tag?pretty' -d 'Black-cats'
curl -XGET 'http://localhost:9200/gb/_analyze?field=tweet?pretty' -d 'Black-cats' 
the results are the same
{
    "tokens": [{
        "token": "black",
        "start_offset": 0,
        "end_offset": 5,
        "type": "<ALPHANUM>",
        "position": 1
    }, {
        "token": "cats",
        "start_offset": 6,
        "end_offset": 10,
        "type": "<ALPHANUM>",
        "position": 2
    }]
}

你的 URL 错了,即你有两个 ? 字符,pretty 之前的那个应该是一个符号 &,试试这个

curl -XGET 'http://localhost:9200/gb/_analyze?field=tag&pretty' -d 'Black-cats'
                                                       ^
                                                       |
                                          this should be a &, not a ?