IME, I haven't been able to replicate Algolia's search responsiveness with ElasticSearch, even with good hardware. I don't think ES/Lucene was ever designed for that use case. IIRC, Algolia was designed to perform well even on mobile phones. I wouldn't dream of getting Lucene to run performantly on a mobile phone.
I'd love to see if someone has done any of the "realtime" Algolia demos backed by ElasticSearch.
In any case, ES excels at very different use cases - I've only seen Algolia provide "basic" search.
I think ES can get there, but depends a lot on what hardware you deploy (SSDs!), how you build your index, and whether you can geographically distribute your search engine close to your users.
We have one ES cluster with hundreds of queries per second that gives median 9ms response times and 99th percentile around 160ms. Another cluster with 100x more data that gets 20-25ms median response times and 99th percentile at 360ms.
Now both of these are just the ES response time, there is additional overhead in responding to an API request and then you also start to get into where your data centers are located relative to the end users.
I'd love to see if someone has done any of the "realtime" Algolia demos backed by ElasticSearch.
In any case, ES excels at very different use cases - I've only seen Algolia provide "basic" search.