Skip to content

Commit e093fad

Browse files
msegelvikjavanna
authored andcommitted
[DOCS] XContentBuilder#bytes method removed, using BytesReference.bytes(docBuilder) (#32771)
1 parent 716cb1f commit e093fad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/java-api/query-dsl/percolate-query.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ XContentBuilder docBuilder = XContentFactory.jsonBuilder().startObject();
4949
docBuilder.field("content", "This is amazing!");
5050
docBuilder.endObject(); //End of the JSON root object
5151
52-
PercolateQueryBuilder percolateQuery = new PercolateQueryBuilder("query", "docs", docBuilder.bytes());
52+
PercolateQueryBuilder percolateQuery = new PercolateQueryBuilder("query", "docs", BytesReference.bytes(docBuilder));
5353
5454
// Percolate, by executing the percolator query in the query dsl:
5555
SearchResponse response = client().prepareSearch("myIndexName")

0 commit comments

Comments
 (0)