Browse Source

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

Morten Segelvik 7 years ago
parent
commit
4d20e69b83
1 changed files with 1 additions and 1 deletions
  1. 1 1
      docs/java-api/query-dsl/percolate-query.asciidoc

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

@@ -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")