Elasticsearch - Autocomplete return word/term/token suggestions instead of whole documents -
i trying implement simple auto completion query terms. there many different approaches of them return documents instead of terms - or authors stopped explaining point , not able adapt.
a user typing in query - e.g. phil want provide list of term completion suggestions philipp, philius, philadelphia, ...
i able document matches via (edge)ngrams, phrase_prefix , on am stuck @ retrieving matching terms (completion suggestions).
can give me hint?
i have documents {"title":"...", "description":"...", "content":"..."} fields have larger string values field content contains fulltext content.
i not want suggest whole title of document containing e.g. philadelphia. word "philadelphia".
looking that, myself.
in solr relatively simple configure (although pain build , keep up-to-date) using solr.spellcheckcomponent. somehow same underlying lucene functionality used differently between solr , elasticsearch, , in elasticsearch geared towards finding whole documents (or whole field values, if will) or seems...
despite profusion of "elasticsearch autocomplete" articles, none appears deal particular issue. doesn't exist. maybe use case different , elasticsearch works them fine, knows?
at point think preparing exact field values use elasticsearch autocomplete (yes, that's input field values, not analyzer tokens) maybe way solve problem. terrible, because performance going low.
Comments
Post a Comment