【发布时间】:2015-12-24 02:17:22
【问题描述】:
为什么我试图解决的弹性搜索 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
}]
}
【问题讨论】:
-
请写清楚
-
您是否通过映射将这些字段之一设置为 not_analyzed?那么其中一个结果是出乎意料的吗?您能否提供映射中的相关 sn-p?
-
对不起,我的英语很差。我已经得到了答案。我的一个节点有不同的中文分析器
标签: indexing elasticsearch mapping