Term suggester example?

I am trying to get term suggest to work and it may be that it's not going
to work the way I think it should, but I can't seem to get it to work at
. So I put together an example index to illustrate the point,
hopefully someone can point out what I'm doing wrong.

Basically, I want to be able to get suggestions for documents based on
terms. For instance, if I have documents with a name of "North America"
and "South America", I would like a _suggest of "america" to return
suggestions for both of those documents. Note that I'm moving away from
completion suggest because they are documented and appear to work only as
prefix suggestors.

Here is my not-working example, appreciate any pointers!



echo ">>> Deleting _all"
curl -XDELETE $ES/_all

CONTINENTS=("North America" "South America" "Europe" "Asia" "Australia")
for ((i = 0; i < ${#CONTINENTS[@]}; i++))
echo ">>> Indexing the '$c' document"
curl -XPOST $ES/continents/continent -d'
"name": "$c"
' && echo
echo "${CONTINENTS[$i]}"

curl -XPOST $ES/continents/_flush && echo

Search for the document using the name

echo ">>> Getting _suggest for 'america'"
curl $ES/continents/_suggest -d'
"my-suggestion" : {
"text" : "america",
"term" : {
"field" : "name",
"suggest_mode" : "always"
}' && echo

Here's the output I'm currently getting:

Getting _suggest for 'america'


You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/56349847-7ee6-4d06-9b26-d624878a311a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.