【发布时间】:2013-04-27 04:52:46
【问题描述】:
我正在尝试使用 delete by query API 从 elasticsearch 中删除记录
执行:
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
但仍然返回结果?
【问题讨论】:
标签: json rest lucene elasticsearch