I have been trying to achieve the Google Completion suggestion feature in
ES, but I could not success till now. Lets take a look to what I have done:
We have created in ES a “MyIndex” index. Associated to that index, we have
a type “”Information” where we defined a field “Data”. Once we have this,
we created the following documents:
PUT localhost:9200/example/information/1{
“Data": “I need help for my family"
}
PUT localhost:9200/example/information/2{
“Data": “I want to help for searching info in internet"
}
PUT localhost:9200/example/information/3{
“Data": “I give help for managing people life”
}
What we need is, given this documents, when a user searchs for “help” that
ES returns completion suggestions like Google does. So, if the user types
“help”, ES should shows suggestions like:
help for my family
help for searching
help for managing
Have you seen the documentation for the suggest API?
I've got a demo working with that, it was pretty easy to setup.
On Monday, March 16, 2015 at 8:42:34 AM UTC-5, Izzat Sabbagh Rodríguez
wrote:
Hi,
I have been trying to achieve the Google Completion suggestion feature in
ES, but I could not success till now. Lets take a look to what I have done:
We have created in ES a “MyIndex” index. Associated to that index, we have
a type “”Information” where we defined a field “Data”. Once we have this,
we created the following documents:
PUT localhost:9200/example/information/1{
“Data": “I need help for my family"
}
PUT localhost:9200/example/information/2{
“Data": “I want to help for searching info in internet"
}
PUT localhost:9200/example/information/3{
“Data": “I give help for managing people life”
}
What we need is, given this documents, when a user searchs for “help” that
ES returns completion suggestions like Google does. So, if the user types
“help”, ES should shows suggestions like:
help for my family
help for searching
help for managing
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.