frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

I made a search engine worse than Elasticsearch (2024)

https://softwaredoug.com/blog/2024/08/06/i-made-search-worse-elasticsearch
122•softwaredoug•1d ago

Comments

niazangels•1d ago
Learnt a lot from this! Thank you for the write up.
neuroelectron•1d ago
This is worth more than Alphabet
sph•21h ago
How? Alphabet already has a search engine worse than Elasticsearch.
endymion-light•18h ago
alphabet have a search engine? i thought it was just an ad machine at this point
softwaredoug•15h ago
An ad machine that's a search engine, just optimized for ad relevance not just search relevance :)
mrguyorama•11h ago
It is a search engine. You enter a search string and it returns all the ads that are associated with that search and your user.
sh34r•22h ago
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.

bob1029•22h ago
You can get pretty far with Lucene primitives. That's the level of abstraction I prefer to work at. Running search in a different process or container means I lose the advantages of tight integration of search/indexer logic with business logic. Keeping indexes on the local disk (just like SQLite) is a really simple deployment model too.

I agree that implementing something like Lucene from scratch would be an uphill battle. Probably not worth the time.

jillesvangurp•21h ago
It's not a reason to not take on such a project and learn something. But it is a good reason to approach the subject with some humility. There are posts here every few months/weeks of someone boasting that they are running circles around Lucene in some way. BTW. Elasticsearch uses Lucene. Lucene is where all the cool stuff it does is implemented.

Implementing your own search is indeed a bit of a rite of passage. Usually, if you go look at such implementations, you'll find they implemented 1% of the features, cut lots of corners and then came up with some benchmark that proves they are faster for some toy dataset. WAND would be a good example of something most of these things don't do.

Doug is of course a search relevance expert who has published several books on the subject. So, this is not some naive person implementing BM25 but just somebody building tools they need to do bigger things. Sometimes Elasticseach/Lucene are just overkill and it is worth having your own implementation.

You can find my own vibe coded version here: https://github.com/jillesvangurp/querylight. Nice embeddable search engine for kotlin multiplatform (works in kotlin-js, android, ios, wasm, and of course jvm). I use it in some browser based apps.

If I need a proper search engine, I use Elasticsearch or Opensearch.

fucalost•11h ago
+1 for OpenSearch, especially with UltraWarm nodes
cha42•21h ago
I use PostgreSQL full text search and GIN indexing and often find it to be good enough and fast enough without the hassle to have to handle a second engine just for search.
stuaxo•18h ago
Having elasticsearch, as this resource hungry slow to update JVM based thing always seems so horrible in Django based projects.

In that world, using haystack and choosing a backend based on C++ is so much less hassle for deployment.

Although for many things just FTS in Postgres is fine too.

I'm sure for planet scale stuff ES is fine, but otherwise I've only found it brings pain in the kind of dev I get to do.

moralestapia•17h ago
I made mine and it performs way better for my specific use case. Also, single digit ms latencies.

I might actually open source it, it's a single file anyway.

pphysch•14h ago
> Improving your simple website's search function will take days or weeks, not hours.

Full-text search, sure, but you can easily provide a better overall search experience by creating a custom wrapping algorithm that provides shortcuts for common access patterns of your users in your application, in addition to full-text search.

Alifatisk•19h ago
This made me so thankful for Elasticsearch existence
stuaxo•18h ago
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).

nchmy•17h ago
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/

0xC0ncord•17h ago
The problem I quickly ran into with Manticoresearch is it's missing a bunch of the API that most Elasticsearch clients expect. It certainly is fast, though.
Imustaskforhelp•15h ago
I am sure that it isn't that big of a dealbreaker for me personally but surely this can be created by the Manticoresearch right? It doesn't seem to be that bad given the performance gains of atleast 2x on elasticsearch which is already pretty performant in my opinion and also, you get to be stress free about if elasticsearch would change its license again or not given their license pull if I remember correctly.
Imustaskforhelp•15h ago
Very interesting. Thanks for the share! Appreciate it.
0xB0UNCE00•13h ago
And so what if it’s worse than elasticsearch, it’s the playing around and learning that counts.
fucalost•11h ago
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...

amai•9h ago
More search engines worse than elastic search:

- https://www.meilisearch.com/

- https://typesense.org/

- https://github.com/Sygil-Dev/whoosh-reloaded

AImmerse Web App

1•yiyih•6m ago•0 comments

Is Jordan Peterson Just Making It Up as He Goes?

https://thewalrus.ca/is-jordan-peterson-just-making-it-up-as-he-goes/
1•sameers•16m ago•0 comments

A new path forward for WordPress, and for the open web

https://joost.blog/path-forward-for-wordpress/
3•twapi•49m ago•0 comments

Fair aims to decentralize WordPress.org services, backed by Linux Foundation

https://www.therepository.email/fair-to-decentralize-wordpress-backed-by-linux-foundation-and-contributors
5•ValentineC•55m ago•0 comments

How to Run Webinars

https://blog.engora.com/2023/07/how-to-run-webinars.html
2•Vermin2000•56m ago•0 comments

Private Equity-Owned Companies Pocket Class Action Payouts

https://www.forbes.com/sites/jeffkauflin/2025/05/21/how-private-equity-owned-companies-quietly-pocket-class-action-payouts/
2•walterbell•57m ago•0 comments

Tesla AI VP Milan Kovac Resigns After 9 Years Leading FSD and Optimus Projects

https://gearmusk.com/2025/06/07/tesla-ai-vp-milan-kovac-resigns/
4•loog5566•1h ago•0 comments

Show HN: The 5-minutes Competitor Analysis

https://www.ycompetitor.com/
2•rubeekrumpet•1h ago•0 comments

I built an Image Splitter tool in under an hour using ChatGPT

https://tools.techchee.com/image-tools/image-splitter
2•ketyung•1h ago•1 comments

DeepSeek-R1-0528 Did Not Have a Moment

https://thezvi.substack.com/p/deepseek-r1-0528-did-not-have-a-moment
3•paulpauper•1h ago•2 comments

What Happens When People Don't Understand How AI Works

https://www.theatlantic.com/culture/archive/2025/06/artificial-intelligence-illiteracy/683021/
3•paulpauper•1h ago•0 comments

Ask HN: Do we need a language designed specifically for AI code generation?

2•baijum•1h ago•0 comments

Good pixel art can be one-shotted by AI now

https://gametorch.app/collections/7
3•gametorch•1h ago•3 comments

I dream of roombas: 1000s of automated AI robots that autonomously maintain code

https://ghuntley.com/ktlo/
5•ghuntley•1h ago•5 comments

China Kicks Off Human Testing of Implantable Brain-Computer Interface Devices

https://www.yicaiglobal.com/news/china-kicks-off-human-testing-of-implantable-brain-computer-interface-devices
2•gametorch•1h ago•0 comments

Why are front end dev demand so high if front end development is easier? (2012)

https://simonwillison.net/2012/Feb/13/why-are-front-end/
15•thunderbong•1h ago•4 comments

A Novel "Reasoning"-Enhancing Technique for Large Language Models

https://marqcodes.com
2•N3Xxus_6•1h ago•2 comments

Astonishing discovery by computer scientist: how to squeeze space into time [video]

https://www.youtube.com/watch?v=p_AW6fomKPI
2•drhodes•2h ago•0 comments

Show HN: Resumable Web Streams

https://github.com/vercel/resumable-stream
3•cramforce•2h ago•0 comments

AMC Says It Will Show More Ads Before Movies

https://www.nytimes.com/2025/06/06/business/movies-theaters-ads-amc.html
7•cebert•2h ago•11 comments

Getting C++ Hello World working on Windows (a comedy & tragedy)

https://sdegutis.github.io/blog/creating-cpp-hello-world.html
4•90s_dev•2h ago•2 comments

NASA delays next flight of Boeing's alternative to SpaceX Dragon

https://theedgemalaysia.com/node/758199
7•bookmtn•2h ago•2 comments

Can Schrodinger's Cat Factor Numbers?

https://mathpages.com/home/kmath013/kmath013.htm
3•gametorch•2h ago•0 comments

NASA Delays Next Flight of Boeing's Alternative to SpaceX Dragon

https://www.bloomberg.com/news/articles/2025-06-06/nasa-delays-next-flight-of-boeing-s-alternative-to-spacex-dragon
3•bookmtn•2h ago•0 comments

California AG vows crack down on copper wire thefts in the state

https://abc7.com/post/california-ag-rob-bonta-vows-crack-down-copper-wire-thefts-state/16678391/
2•lxm•2h ago•0 comments

Show HN: A photo backup idea – to your own storage, not iCloud/Google

https://myphoto-vault.netlify.app/
4•Nainiket•2h ago•0 comments

Getting Past Procrastination

https://spectrum.ieee.org/getting-past-procastination
21•WaitWaitWha•2h ago•5 comments

Reverse Engineering Cursor's LLM Client

https://www.tensorzero.com/blog/reverse-engineering-cursors-llm-client/
4•paulwarren•2h ago•0 comments

Show HN: Cpdown – Copy any webpage/YouTube subtitle as clean Markdown(LLM-ready)

https://github.com/ysm-dev/cpdown
2•ysm0622•2h ago•0 comments

Pentagon Disinformation Fueled America's UFO Mythology

https://www.wsj.com/politics/national-security/ufo-us-disinformation-45376f7e
6•doener•2h ago•1 comments