提交 578fd703 编写于 作者: a198720's avatar a198720 提交者: 彭勇升 pengys

fixed bug: multiple formatIndexName in forceUpdate method (#1960)

上级 5ab2ee3a
...@@ -142,7 +142,6 @@ public class ElasticSearchClient implements Client { ...@@ -142,7 +142,6 @@ public class ElasticSearchClient implements Client {
} }
public void forceUpdate(String indexName, String id, XContentBuilder source, long version) throws IOException { public void forceUpdate(String indexName, String id, XContentBuilder source, long version) throws IOException {
indexName = formatIndexName(indexName);
UpdateRequest request = prepareUpdate(indexName, id, source); UpdateRequest request = prepareUpdate(indexName, id, source);
request.version(version); request.version(version);
request.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE); request.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
...@@ -150,7 +149,6 @@ public class ElasticSearchClient implements Client { ...@@ -150,7 +149,6 @@ public class ElasticSearchClient implements Client {
} }
public void forceUpdate(String indexName, String id, XContentBuilder source) throws IOException { public void forceUpdate(String indexName, String id, XContentBuilder source) throws IOException {
indexName = formatIndexName(indexName);
UpdateRequest request = prepareUpdate(indexName, id, source); UpdateRequest request = prepareUpdate(indexName, id, source);
request.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE); request.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
client.update(request); client.update(request);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册