suggest api tests

This commit is contained in:
Honza Kral 2013-07-23 19:26:22 +02:00
parent 77fe6f25e2
commit 875de1a5a6

View File

@ -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}