I have been working on an autocomplete function. I can make it work if I am
doing an autocomplete on the document itself (i.e. display titles that
match criteria as person types). However, what I want to do is suggest
different search terms, not the actual documents.
For example, if the person types "data" they would see a drop down that
said:
data
data sciences
database
data visualization
data sciences community
datastorage
I have a shingle analyzer that appropriately creates these tokens (as seen
by using a analyze api on sample data) but I don't see how to get at those
tokens directly.
I looked at using the facets, but what I need to return aren't fields from
actual documents, just search tokens created from the document.
I played around with the new suggest api, but while it was good at dealing
with misspellings, I couldn't see how to use it to suggest a fuller search
term/phrase.
Am I missing something obvious or isn't this possible?
I've been searching for the same functionality but not sure it is currently
offered in Elasticsearch.
My example is searching for "Steroids baseball" would suggest other terms
like "Ryan" and "Braun".
Bumping this topic to see if someone else has a solution.
Thanks,
Aaron
On Thursday, July 18, 2013 8:26:54 AM UTC-5, Andrea Tarr wrote:
I have been working on an autocomplete function. I can make it work if I
am doing an autocomplete on the document itself (i.e. display titles that
match criteria as person types). However, what I want to do is suggest
different search terms, not the actual documents.
For example, if the person types "data" they would see a drop down that
said:
data
data sciences
database
data visualization
data sciences community
datastorage
I have a shingle analyzer that appropriately creates these tokens (as seen
by using a analyze api on sample data) but I don't see how to get at those
tokens directly.
I looked at using the facets, but what I need to return aren't fields from
actual documents, just search tokens created from the document.
I played around with the new suggest api, but while it was good at dealing
with misspellings, I couldn't see how to use it to suggest a fuller search
term/phrase.
Am I missing something obvious or isn't this possible?
On Thursday, July 18, 2013 3:26:54 PM UTC+2, Andrea Tarr wrote:
I have been working on an autocomplete function. I can make it work if I
am doing an autocomplete on the document itself (i.e. display titles that
match criteria as person types). However, what I want to do is suggest
different search terms, not the actual documents.
For example, if the person types "data" they would see a drop down that
said:
data
data sciences
database
data visualization
data sciences community
datastorage
I have a shingle analyzer that appropriately creates these tokens (as seen
by using a analyze api on sample data) but I don't see how to get at those
tokens directly.
I looked at using the facets, but what I need to return aren't fields from
actual documents, just search tokens created from the document.
I played around with the new suggest api, but while it was good at dealing
with misspellings, I couldn't see how to use it to suggest a fuller search
term/phrase.
Am I missing something obvious or isn't this possible?
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.