We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e692c3 commit 4d20e69Copy full SHA for 4d20e69
docs/java-api/query-dsl/percolate-query.asciidoc
@@ -49,7 +49,7 @@ XContentBuilder docBuilder = XContentFactory.jsonBuilder().startObject();
49
docBuilder.field("content", "This is amazing!");
50
docBuilder.endObject(); //End of the JSON root object
51
52
-PercolateQueryBuilder percolateQuery = new PercolateQueryBuilder("query", "docs", docBuilder.bytes());
+PercolateQueryBuilder percolateQuery = new PercolateQueryBuilder("query", "docs", BytesReference.bytes(docBuilder));
53
54
// Percolate, by executing the percolator query in the query dsl:
55
SearchResponse response = client().prepareSearch("myIndexName")
0 commit comments