[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:
parent
d00d18a36d
commit
a6d57f50f6
|
@ -140,7 +140,7 @@ String json = "{" +
|
|||
"}";
|
||||
|
||||
IndexResponse response = client.prepareIndex("twitter", "tweet")
|
||||
.setSource(json)
|
||||
.setSource(json, XContentType.JSON)
|
||||
.get();
|
||||
--------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue