[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).
This commit is contained in:
jiangzhuolin 2017-09-11 16:06:14 +08:00 committed by Christoph Büscher
parent d00d18a36d
commit a6d57f50f6
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ String json = "{" +
"}";
IndexResponse response = client.prepareIndex("twitter", "tweet")
.setSource(json)
      .setSource(json, XContentType.JSON)
.get();
--------------------------------------------------