删除存在的文档抛出FileNotFoundException?
问题描述:
1.I搜索文档,RESP:删除存在的文档抛出FileNotFoundException?
"_index": "index-15",
"_type": "member",
"_id": "179751941",
"_score": 1,
"_routing": "15375",
"_source": {xxx}
2.I使用DELETE
方法来删除一个文档,并抛出一个FileNotFoundException
。
Caused by: java.io.FileNotFoundException: http://ip:port/index-15/member/179751941
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1835)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
答
如果您创建使用routing
参数,这似乎根据你展示样本文档是你的情况的文件,那么你还需要删除您的文档时,指定路由参数?routing=15375
。
您需要指定路由参数以及'?routing = 15375' – Val
@ Val,谢谢,但有时我可以删除doc成功,为什么? –
可能是因为那些文档是在没有路由的情况下创建的?听起来可能吗? – Val