mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
[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…
x
Reference in New Issue
Block a user