elasticsearch 源筛选在kibana上不起作用
我正试图排除带有 我创建了一个索引:elasticsearch 源筛选在kibana上不起作用,elasticsearch,kibana,elasticsearch,Kibana,我正试图排除带有 我创建了一个索引: put testindex { "mappings": { "type1": { "properties":{ "name": { "type": "text" }, "age": { "type": "integer" }
put testindex
{
"mappings": {
"type1": {
"properties":{
"name": { "type": "text" },
"age": { "type": "integer" }
}
}
}
}
插入一份文件:
put testindex/type1/a
{
"name":"toto",
"age":23
}
然后尝试筛选查询:
get testindex/_search
{
"_source": {
"excludes": [ "age" ]
},
"query": {
"bool": {
"should": []
}
}
}
结果是:
"hits": [
{
"_index": "testindex",
"_type": "type1",
"_id": "a",
"_score": 1,
"_source": {
"name": "toto",
"age": 23
}
}
]
我不明白为什么它不在源代码中隐藏“age”字段。
_来源:false给出相同的结果。我使用了elasticsearch&kibana 5.6,我找到了。 可能是因为基巴纳。 当我用小写字母表示“get”时。它不起作用
get testindex/_search
{
"_source": {
"excludes": [ "age" ]
},
"query": {
"bool": {
"should": []
}
}
}
当我使用大写时,它就起作用了。我真的不知道为什么,但就是这样
GET testindex/_search
{
"_source": {
"excludes": [ "name" ]
},
"query": {
"bool": {
"should": []
}
}
}
在ES 6.0中,精确的查询对我有效(如,
age
字段被隐藏)。我不使用Kibana,但Kibana在这里相关吗?Kibana不相关。在ES 5.6.0上为我工作您正在使用哪个客户端?如果你用POST而不是GET呢?