what a weird question: who looks at a search engine and thinks yea hm that's trivial enough i could do it myself in a weekend?
Ask HN: Why should I use Elasticsearch instead of building from scratch
11–20 of 39 posts
Re: Ask HN: Why should I use Elasticsearch instead of building from scratch
#12With that little information from the OP the answer is probably: Use ES or if it's a small side project use your DB's included full text search if it's good enough.
Re: Ask HN: Why should I use Elasticsearch instead of building from scratch
#13Re: Ask HN: Why should I use Elasticsearch instead of building from scratch
#14Tough to answer w/o more info. FWIW, I've used Lucene, Solr, and Elasticsearch and have ended up settling on Lucene being the best interface for me.
Re: Ask HN: Why should I use Elasticsearch instead of building from scratch
#15With that little information from the OP the answer is probably: Use ES or if it's a small side project use your DB's included full text search if it's good enough.
You can go far using purely Postgres full text search. I ported a site from Solr to PG full text because of strange syncing issues and it was just as fast. Afterwards I never really saw the point of any of the search systems other than elastic search because the streaming capabilities that it gives you.
Re: Ask HN: Why should I use Elasticsearch instead of building from scratch
#16Re: Ask HN: Why should I use Elasticsearch instead of building from scratch
#17With that little information from the OP the answer is probably: Use ES or if it's a small side project use your DB's included full text search if it's good enough.
When is a full text search within a DB not good enough? Is ES usually used along side a typical RDS or is it a replacement?
At work we just materialize the data from PG into ES and take advantage of the powerful ES queries and redundancy. Scaling up by just adding nodes is easier.
Re: Ask HN: Why should I use Elasticsearch instead of building from scratch
#18With that little information from the OP the answer is probably: Use ES or if it's a small side project use your DB's included full text search if it's good enough.
When is a full text search within a DB not good enough? Is ES usually used along side a typical RDS or is it a replacement?
Re: Ask HN: Why should I use Elasticsearch instead of building from scratch
#19Use HN to poll for opinions and experiences from others, not for things that take 30 minutes to resolve.
Re: Ask HN: Why should I use Elasticsearch instead of building from scratch
#20You should write one from scratch to get a deeper understanding of how hard it is to return highly relevant results quickly. Tokenizing, stemming, bag of words, and tf-idf for ranking get you to an MVP, but then you realize how good production grade search engines are today. Solr is good. I've been wanting to try Lunr [1] for small sites. [1]: https://github.com/olivernn/lunr.js
We wrote our own search engine at that point. You are right that there are a lot of little “devil in the details” issues. But overall it was a fun experience.
This was needed to support some specific machine learning workflows in the search ranking process — which could not be used if we paid the high latency cost to first get preliminary results in Solr.
So we took a “create your own index data structures” approach with index data (both the normalized bag of words vectors and companion data like boolean filters), which allowed us to highly optimize the initial broad ranking query. Latency was low enough that it allowed the time cost of calling follow-on machine learning services.
This was for a fairly high-traffic product search engine at an online retailer. It ended up working very well and over a span of about two years we eventually rolled all search traffic onto the in-house platform, even the parts not needing the machine learning services, and our query latencies went down across all our traffic, and we retired the original Solr implementation.
Wouldn’t be the right choice for everyone, but it informs my opinion a lot about the worthwhileness of creating an in-house search engine to specifically replace Solr. I’d suspect a lot of medium-sized or large companies running Solr should seriously consider it.