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
119•softwaredoug•1d ago

Comments

niazangels•19h ago
Learnt a lot from this! Thank you for the write up.
neuroelectron•19h ago
This is worth more than Alphabet
sph•14h ago
How? Alphabet already has a search engine worse than Elasticsearch.
endymion-light•11h ago
alphabet have a search engine? i thought it was just an ad machine at this point
softwaredoug•8h ago
An ad machine that's a search engine, just optimized for ad relevance not just search relevance :)
mrguyorama•4h 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•15h 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•14h 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•14h 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•4h ago
+1 for OpenSearch, especially with UltraWarm nodes
cha42•13h 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•11h 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•10h 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•7h 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•12h ago
This made me so thankful for Elasticsearch existence
stuaxo•11h 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•10h 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•10h 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•8h 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•8h ago
Very interesting. Thanks for the share! Appreciate it.
0xB0UNCE00•6h ago
And so what if it’s worse than elasticsearch, it’s the playing around and learning that counts.
fucalost•4h 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•2h ago
More search engines worse than elastic search:

- https://www.meilisearch.com/

- https://typesense.org/

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

A year of funded FreeBSD development

https://www.daemonology.net/blog/2025-06-06-A-year-of-funded-FreeBSD.html
97•cperciva•2h ago•18 comments

How we decreased GitLab repo backup times from 48 hours to 41 minutes

https://about.gitlab.com/blog/2025/06/05/how-we-decreased-gitlab-repo-backup-times-from-48-hours-to-41-minutes/
277•immortaljoe•6h ago•111 comments

The time bomb in the tax code that's fueling mass tech layoffs

https://qz.com/tech-layoffs-tax-code-trump-section-174-microsoft-meta-1851783502
345•booleanbetrayal•2d ago•230 comments

Japanese researchers develop transparent paper as alternative to plastics

https://japannews.yomiuri.co.jp/science-nature/technology/20250605-259501/
6•anigbrowl•43m ago•1 comments

Sandia turns on brain-like storage-free supercomputer

https://blocksandfiles.com/2025/06/06/sandia-turns-on-brain-like-storage-free-supercomputer/
126•rbanffy•7h ago•41 comments

Odyc.js – A tiny JavaScript library for narrative games

https://odyc.dev
160•achtaitaipai•8h ago•30 comments

United States Digital Service Origins

https://usdigitalserviceorigins.org/
88•ronbenton•2h ago•37 comments

A masochist's guide to web development

https://sebastiano.tronto.net/blog/2025-06-06-webdev/
151•sebtron•8h ago•17 comments

Onyx (YC W24) – AI Assistants for Work Hiring Founding AE

https://www.ycombinator.com/companies/onyx/jobs/Gm0Hw6L-founding-account-executive
1•yuhongsun•1h ago

The Illusion of Thinking: Understanding the Limitations of Reasoning LLMs [pdf]

https://ml-site.cdn-apple.com/papers/the-illusion-of-thinking.pdf
41•amrrs•4h ago•6 comments

Supreme Court Gives Doge Access to Social Security Data

https://www.bloomberg.com/news/articles/2025-06-06/supreme-court-gives-doge-access-to-social-security-data
52•speckx•1h ago•18 comments

Too Many Open Files

https://mattrighetti.com/2025/06/04/too-many-files-open
82•furkansahin•7h ago•64 comments

Meta: Shut down your invasive AI Discover feed

https://www.mozillafoundation.org/en/campaigns/meta-shut-down-your-invasive-ai-discover-feed-now/
402•speckx•6h ago•177 comments

Smalltalk, Haskell and Lisp

https://storytotell.org/smalltalk-haskell-and-lisp
9•todsacerdoti•1h ago•3 comments

SaaS is just vendor lock-in with better branding

https://rwsdk.com/blog/saas-is-just-vendor-lock-in-with-better-branding
111•pistoriusp•4h ago•61 comments

Series C and Scale

https://www.cursor.com/en/blog/series-c
41•fidotron•5h ago•36 comments

Curate your shell history

https://esham.io/2025/05/shell-history
81•todsacerdoti•8h ago•53 comments

Show HN: AI game animation sprite generator

https://www.godmodeai.cloud/ai-sprite-generator
29•lyogavin•2h ago•16 comments

Researchers find a way to make the HIV virus visible within white blood cells

https://www.theguardian.com/global-development/2025/jun/05/breakthrough-in-search-for-hiv-cure-leaves-researchers-overwhelmed
153•colinprince•5h ago•18 comments

An Interactive Guide to Rate Limiting

https://blog.sagyamthapa.com.np/interactive-guide-to-rate-limiting
109•sagyam•7h ago•33 comments

Supreme Court allows DOGE to access social security data

https://www.nbcnews.com/politics/supreme-court/supreme-court-trump-doge-social-security-data-access-elon-musk-rcna206515
30•anigbrowl•1h ago•10 comments

What you need to know about EMP weapons

https://www.aardvark.co.nz/daily/2025/0606.shtml
94•flyingkiwi44•11h ago•122 comments

How many trees are there in the North American boreal forest?

https://nsojournals.onlinelibrary.wiley.com/doi/10.1002/ecog.07677
6•PaulHoule•2h ago•1 comments

A Rippling Townhouse Facade by Alex Chinneck Takes a Seat in a London Square

https://www.thisiscolossal.com/2025/05/alex-chinneck-a-week-at-the-knees/
10•surprisetalk•3h ago•7 comments

Wendelstein 7-X sets new fusion record

https://www.heise.de/en/news/Wendelstein-7-X-sets-new-fusion-record-10422955.html
103•doener•3d ago•6 comments

Swift and the Cute 2d game framework: Setting up a project with CMake

https://layer22.com/swift-and-cute-framework-setting-up-a-project-with-cmake
75•pusewicz•11h ago•71 comments

Workhorse LLMs: Why Open Source Models Dominate Closed Source for Batch Tasks

https://sutro.sh/blog/workhorse-llms-why-open-source-models-win-for-batch-tasks
16•cmogni1•3h ago•4 comments

A leaderless NASA faces its biggest-ever cuts

https://www.economist.com/science-and-technology/2025/06/04/a-leaderless-nasa-faces-its-biggest-ever-cuts
12•libraryofbabel•4h ago•4 comments

Weaponizing Dependabot: Pwn Request at its finest

https://boostsecurity.io/blog/weaponizing-dependabot-pwn-request-at-its-finest
73•chha•11h ago•39 comments

Free Gaussian Primitives at Anytime Anywhere for Dynamic Scene Reconstruction

https://zju3dv.github.io/freetimegs/
54•trueduke•7h ago•9 comments