Hello AP ,
Yes that is how it works.
If the input text ( cali ) is the affix of any of the input then the output
would be returned.
{
"id" : "ID1",
"name" : "AAA BBB CCCC DDD EEE FFFF GGG HHHHH IIII JJJJ KKK LLL 999
888",
"suggest" : {
"input":
["AAA","BBB","CCCC","DDD","EEE","US","California","Framework","IIII","JJJJ","KKK","LLL","999","888"],
"output": "California City"
"payload" : {
"id" : "ID1",
"name" : text
}
}
In this example , if the input string is cali or fra or ee or US , it will
all match to "Califronia City" and this output text and payload would be
returned.
Thanks
Vineeth Mohan,
Elasticsearch consultant,
qbox.io ( Elasticsearch service provider http://qbox.io/)
On Mon, Apr 13, 2015 at 11:53 PM, Ap usc90909@gmail.com wrote:
How do you get the exact matched token from the completion suggester ?
eg.
{
"id" : "ID1",
"name" : "AAA BBB CCCC DDD EEE FFFF GGG HHHHH IIII JJJJ KKK LLL
999 888",
"suggest" : {
"input":
["AAA","BBB","CCCC","DDD","EEE","US","California","Framework","IIII","JJJJ","KKK","LLL","999","888"],
"output":
"payload" : {
"id" : "ID1",
"name" : text
}
}
So if a user types cali, the output that needs to be returned to the user
is the matched token "California" instead of the complete string or id.
Thanks
--
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/7b04ed89-814d-48e4-8666-c4f24f45186d%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/7b04ed89-814d-48e4-8666-c4f24f45186d%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.
--
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/CAGdPd5%3D2fvicp6MPfTLV-HkL-NtHE7d7cQBJXoz9MK%2Btz6uJgg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.