I've read almost every Elasticsearch documentation on suggesters, and I have yet to find what I'm looking for. Is there any way I can mimic a Google-like typeahead search?
My potential plan is to try these steps:
create a separate index just to record all possible searches that users perform on my site and store them into the index with date, time, input
delete content after a month to maintain reasonable storage and relevance
within my search bar,i want to be able to search the content of my files AS WELL AS everyone else's searches that seem relevant and possibly boosting certain results
Has anyone tried this? Does anyone see a setback for this - in terms of memory/security/performance/etc?
P.S. I do not want Results Suggest (results with top hits). I want Search Suggest (what others have been searching for).
Thanks, @msimos! I guess my main question is if making that separate index just to retain other people's searches is a good idea...performance-wise...or if there's a method that is better than this?
It's interesting to me that I haven't come across anyone doing this, so I'm a bit skeptical.
I think this sounds fine assuming your index is deduping what people are searching. And you may want to record how many times a phrase is searched for and using that to boost results. Using completion suggest will be more performant over edge ngrams because the data structures are built in memory.
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.