From f3a300dc0b1670b0cbbf18fab5b780ddc1ecebdb Mon Sep 17 00:00:00 2001 From: coder279 Date: Fri, 13 Jan 2023 16:07:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dbulk=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=8C=87=E5=AE=9Arouting=E5=87=BD=E6=95=B0=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- es/doc_operation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es/doc_operation.go b/es/doc_operation.go index 0105fb6d..0596a569 100644 --- a/es/doc_operation.go +++ b/es/doc_operation.go @@ -176,7 +176,7 @@ func (c *Client) BulkDelete(indexName, id, routing string) { func (c *Client) BulkDeleteWithVersion(indexName, id, routing string, version int64) { bulkDeleteRequest := elastic.NewBulkDeleteRequest().Index(indexName).Id(id).VersionType(DefaultVersionType).Version(version) if len(routing) > 0 { - bulkDeleteRequest.Id(routing) + bulkDeleteRequest.Routing(routing) } c.BulkProcessor.Add(bulkDeleteRequest) } -- Gitee From 2bb7a63b9a60ec922c55832062e1a107e38b591f Mon Sep 17 00:00:00 2001 From: coder279 Date: Fri, 13 Jan 2023 16:17:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dbulk=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=8C=87=E5=AE=9Arouting=E5=87=BD=E6=95=B0=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- es/doc_operation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es/doc_operation.go b/es/doc_operation.go index 0596a569..861bdba5 100644 --- a/es/doc_operation.go +++ b/es/doc_operation.go @@ -168,7 +168,7 @@ func (c *Client) DeleteByQuery(ctx context.Context, indexName, id, routing strin func (c *Client) BulkDelete(indexName, id, routing string) { bulkDeleteRequest := elastic.NewBulkDeleteRequest().Index(indexName).Id(id) if len(routing) > 0 { - bulkDeleteRequest.Id(routing) + bulkDeleteRequest.Routing(routing) } c.BulkProcessor.Add(bulkDeleteRequest) } -- Gitee