Skip to content

Commit

Permalink
fix documentation test error
Browse files Browse the repository at this point in the history
  • Loading branch information
wangszuyung committed Jun 15, 2018
1 parent 9d06e09 commit f9da579
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2231,6 +2231,8 @@ public void onFailure(Exception e) {
request.content(BytesReference.bytes(builder), XContentType.JSON); // <1>
// end::put-stored-script-content-mustache

client.indices().putStoredScript(request, RequestOptions.DEFAULT);

Map<String, Object> script = getAsMap("/_scripts/id");
assertThat(extractValue("script.lang", script), equalTo("mustache"));
assertThat(extractValue("script.source", script), equalTo("{\"query\":{\"match\":{\"title\":\"{{query_string}}\"}}}"));
Expand Down

0 comments on commit f9da579

Please sign in to comment.