[英]Elasticsearch/Kibana unable to search field
I am unable to search for a field via Elasticsearch query and also using Kibana. 我无法通过Elasticsearch查询以及Kibana搜索字段。 My documents looks like this:
我的文档如下所示:
"_index": "twitter",
"_type": "nissan",
"_id": "AVm3oHh1iSIXn8b-9qC1",
"_score": 1,
"_source": {
"id_str": "822121770627067911",
"id": 822121770627067900,
"text":"Super looking query"
I perform query: 我执行查询:
"size" : 1,
"query": {
"match": {
"id": 822121770627067900
}
}
and there are no hits, also tried with id_str
field 并且没有点击,也尝试了
id_str
字段
Mapping looks like this mapping 映射看起来像这样的映射
Wierd thing for me is when I search for text: looking
I get right result. 对我来说,更奇怪的是,当我搜索
text: looking
我得到正确的结果。 Mapping for text
field is also same. text
字段的映射也相同。 Do I need to change mapping for id_str
to not_analyzed
or there is some tricky search. 我是否需要更改映射
id_str
到not_analyzed
还是有一些棘手的搜索。 Thank you for your help. 谢谢您的帮助。
Is your id field indexed? 您的id字段被索引了吗? At the top of your Settings > Indices > twitter page in Kibana you can click the orange "Refresh Field List" icon to pick up new fields not in your index-pattern initial definition.
在Kibana的“设置”>“索引”>“推特”页面顶部,您可以单击橙色的“刷新字段列表”图标来选取不在索引模式初始定义中的新字段。 Then your id lookup should work if the id field is added.
然后,如果添加了id字段,则您的id查找应该可以工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.