我正在尝试使用按查询删除API从弹性搜索中删除记录
执行:
curl -XDELETE localhost:4040/search/foo/_query -d '{
"term": {
"record id": "0f9eaa6f-90bb-4dee-9ecb-78a5d04719c0"
}
}'
结果是:
{
"ok": true,
"_indices": {
"foo": {
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
}
}
}
}
然而,查询:
curl -XGET localhost:4040/search/foo/_search -d '{
"query": {
"match": {
"record id": "0f9eaa6f-90bb-4dee-9ecb-78a5d04719c0"
}
}
}'
给我:
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
}
}
打印了 5 条记录...
我试过运行:
curl -XGET localhost:4040/search/foo/_refresh
但仍然返回结果?