From a6d57f50f625048adc3bab024133a5ad4c8b24ed Mon Sep 17 00:00:00 2001 From: jiangzhuolin Date: Mon, 11 Sep 2017 16:06:14 +0800 Subject: [PATCH] [Docs] Update method setSource(byte[] source) (#26561) The method setSource(byte[]) from the type IndexRequestBuilder is deprecated, use the method setSource(byte[] source, XContentType xContentType). --- docs/java-api/docs/index_.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/java-api/docs/index_.asciidoc b/docs/java-api/docs/index_.asciidoc index 0b91622dd81..b32955d9d4f 100644 --- a/docs/java-api/docs/index_.asciidoc +++ b/docs/java-api/docs/index_.asciidoc @@ -140,7 +140,7 @@ String json = "{" + "}"; IndexResponse response = client.prepareIndex("twitter", "tweet") - .setSource(json) +       .setSource(json, XContentType.JSON) .get(); --------------------------------------------------