我正在尝试调用(注意多个索引):
GET test1,test2/_search?ignore_unavailable=true
{
"query": {
"match_all": {}
},
"_source": {
"exclude": [
"data"
]
}
}
得到了:
{
"message": "When Content-Type:application/x-www-form-urlencoded, URL cannot include query-string parameters (after '?'): '/test1,test2/_search?ignore_unavailable=true'"
}
如果包含ignore_unavailable
作为参数,或者当某个索引不存在时,如何将搜索不失败?
ES版本为5.3
答案 0 :(得分:1)
此查询对我有用。
foobar = {} ["one", "two"];
console.log(foobar);