from Hacker News

I made a search engine worse than Elasticsearch (2024)

by softwaredoug on 6/5/25, 6:37 PM with 24 comments

  • by sh34r on 6/6/25, 7:07 AM

    I feel like this is a rite of passage for all engineers: messing around with things like Lucene long enough to realize that search-for-humans is a relatively hard problem, even at small scale.

    Improving your simple website's search function will take days or weeks, not hours. If you make your own search engine, it's almost guaranteed to be worse than ElasticSearch.

  • by nchmy on 6/6/25, 12:04 PM

    Folks should check out Manticoresearch. It evolved out of Sphinx search, which is older than Lucene and powers things like Craigslist.

    Much easier to deal with and faster than elastic

    https://manticoresearch.com/

  • by fucalost on 6/6/25, 5:59 PM

    I actually really like Elasticsearch. It’s very powerful, there’s a healthy ecosystem of tools (increasingly for OpenSearch too), and the query language makes sense to me.

    Sure it’s computationally expensive, inefficient even, but for many use-cases it just works.

    I’d add that for production deployments, AWS has developed a new instance family that enables OpenSearch data to be stored on S3 [1], bringing significant cost savings.

    [1] https://docs.aws.amazon.com/opensearch-service/latest/develo...

  • by intalentive on 6/7/25, 4:43 PM

    You can probably beat the standard if you have a special case to optimize for — for example, if your documents are fixed “chunks” then you don’t need to normalize by length. If you can extract sets of keywords with NLP, then you don’t need to normalize by frequency.

    Also you can get some cool behavior out of representing a corpus as a competitive network that reverberates, where a query yields an “impulse response”.

  • by amai on 6/6/25, 7:39 PM

  • by 0xB0UNCE00 on 6/6/25, 3:51 PM

    And so what if it’s worse than elasticsearch, it’s the playing around and learning that counts.
  • by Alifatisk on 6/6/25, 9:51 AM

    This made me so thankful for Elasticsearch existence
  • by niazangels on 6/6/25, 2:38 AM

    Learnt a lot from this! Thank you for the write up.
  • by neuroelectron on 6/6/25, 2:56 AM

    This is worth more than Alphabet
  • by stuaxo on 6/6/25, 11:06 AM

    I mean.. I hate having to use elasticsearch, so this is quite a feat.

    (To be fair, I've only worked on projects that use ES where it is entirely unnessacary).