簡體   English   中英

Elasticsearch Delete API僅從一個分片中刪除記錄。 除非我手動刪除並重建整個索引,否則仍然可以搜索該記錄

[英]Elasticsearch delete api only deletes the record from one shard. The record still can be searched unless I manually delete & rebuild the whole index

Elasticsearch Delete API僅從一個分片中刪除記錄。 除非我手動刪除並重建整個索引,否則仍然可以搜索該記錄。

以下是Delete API的響應:

{"found":false,"_index":"companyindex","_type":"companydata","_id":"932","_version":1,"_shards":{"total":2,"successful":1,"failed":0}}

問題出在文檔ID中。 實際上,我們將user_id輸出為document_id。 因此,從未找到company_id。 因此,我們在cURL響應中得到了{“ found:false}。

抱歉地說,問題文本也需要一點修改。 記錄從未從1個分片中刪除(更正了自己之后,記錄僅存在於節點上,而不管它有多少個分片)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM