[DOCS] XContentBuilder#bytes method removed, using BytesReference.bytes(docBuilder) (#32771)

This commit is contained in:
Morten Segelvik 2018-08-13 11:29:18 +02:00 committed by Luca Cavanna
parent 3e692c3f3d
commit 4d20e69b83
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ XContentBuilder docBuilder = XContentFactory.jsonBuilder().startObject();
docBuilder.field("content", "This is amazing!");
docBuilder.endObject(); //End of the JSON root object
PercolateQueryBuilder percolateQuery = new PercolateQueryBuilder("query", "docs", docBuilder.bytes());
PercolateQueryBuilder percolateQuery = new PercolateQueryBuilder("query", "docs", BytesReference.bytes(docBuilder));
// Percolate, by executing the percolator query in the query dsl:
SearchResponse response = client().prepareSearch("myIndexName")