diff --git a/rest-api-spec/test/suggest/10_basic.yaml b/rest-api-spec/test/suggest/10_basic.yaml new file mode 100644 index 00000000000..4104163d7d9 --- /dev/null +++ b/rest-api-spec/test/suggest/10_basic.yaml @@ -0,0 +1,23 @@ +--- +"Basic tests for suggest API": + - do: + index: + index: test + type: test + id: testing_document + body: + body: Amsterdam meetup + + - do: + indices.refresh: {} + + - do: + suggest: + body: + test_suggestion: + text: "The Amsterdma meetpu" + term: + field: body + + - match: {test_suggestion.0.options.0.text: amsterdam} + - match: {test_suggestion.1.options.0.text: meetup}