How good is to use Elasitc search Prefix query with respect to performance? How good is to use Elasitc search Prefix query with respect to performance? elasticsearch elasticsearch

How good is to use Elasitc search Prefix query with respect to performance?


In my previous project we used the query language, which heavily rely on operators like this star|part-of-term|star, and I could say in some bad curcimstances (big index - 100+ mln docs, big text to analyze, complex terms, multiple languages) - Lucene could behave slowly (basically, because leading stars are heavy in standard Lucene implementation, also, they are prohibited). All it was implemented without MultiMatchQuery.

One could imagine, that implementing improvements like suffix arrays (https://en.wikipedia.org/wiki/Suffix_array) will help (at least it helped us)

So, conclusion, be careful, and if your index (since it's only 30 days of history) is relatively small you should be fine.


Usually Elasticsearch does a good job in search. It could be slower in complex nested aggregation queries but simple search is very fast. I don't think you need to worry too much in advance.