Skip to content

Commit

Permalink
[DOCS] XContentBuilder#bytes method removed, using BytesReference.byt…
Browse files Browse the repository at this point in the history
…es(docBuilder) (#32771)
  • Loading branch information
msegelvik authored and javanna committed Aug 13, 2018
1 parent 716cb1f commit e093fad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/java-api/query-dsl/percolate-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit e093fad

Please sign in to comment.