Elasticsearch is a powerful tool, no doubt but sometimes it can really make
you cry when you are not able to find out a good combination of index and
search analyzers along with a good query type for implementing an
autocompleter. I have read and searched on Internet that this combination
differs from one use case to another and only way to find out this is to
try and test it yourself. But can't we generalize this use case to some of
the extent ?
I'll take a base case where a document contains some title as a string and
some description as a string. Mostly people implement autocompleter around
such docs only. And a basic expectation of autocompleter is to find most
appropriate document corresponding to a user query. A good autocompleter
gives docs which exactly matches the user query but since user query can
vary a lot from the actual content, the best autocompleter can do is to
return docs which contains the maximum user typed terms and that thing is
accomplished by a good query mechanism. So, can't we generalize a good
combination for this base case. After that people can just extend that base
case for other parameters of their docs.
I think people who have spent time with ElasticSearch are aware of pros and
cons of almost every possible combination of these things. So, it can be a
good way to start a thread where people can actually share their thoughts,
experiences and suggestions on different possible combination of analyzers
and query types so that beginners don't have to struggle a lot initially
with using ElasticSearch.
I'll start with sharing mine combination (obviously it is not the best one
but still working on it to improve the effectiveness of my autocompleter):
I have used standard tokenizer along with token filters:
lowercase,asciifolding,suggestion_shingle,edgengrams (front). I have used
same analyzers for both searching and indexing. For the query type, I'm
using custom score query but somehow the results are not that
effective/tuned. I expect my autocompleter to give documents which contains
the maximum matching terms from a user typed query but it's not giving
results that way.I'm still working on fine tuning it.
I think the above combination solves the problem to a certain extent but
still there are a hell lot of other ways to go about it which I'm not aware
I request you people to please give some suggestions, views and share your
personal experiences of going around this particular problem.
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 email@example.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/81b589c2-b1a1-4f8e-8b3a-8e377e864123%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.