Skip to content

SearchBench

Luxir is a performance-first search engine, so its development is driven by benchmarks. SearchBench is the suite built for that job. It shows where the time goes, whether a change helped, and when something regressed. A benchmark used to make engineering decisions has to be accurate, because a misleading number sends the work in the wrong direction.

Once the harness existed, it made sense to extend it to drive other engines the same way, as a yardstick for Luxir and because the comparisons are interesting in their own right.

Elasticsearch and OpenSearch come first because both are built on Apache Lucene. I know Lucene well (I’m still a committer), and that is what makes a white-box comparison possible: I can tell whether each engine is being asked to do the same work, and why a number comes out the way it does. And in my admittedly biased opinion, Lucene is the state of the art in full-text search, which makes it the bar worth measuring against.

Solr is conspicuously absent. That’s deliberate, and it’s personal. I created Solr, and I still care about it and about the people who work on it. I would be the author on both sides of that comparison, and I’d rather not be the one publishing it, whichever way it came out.

I wrote Luxir, so don’t take my word for the results. The harness, the engine configurations, and the raw results are all public, so anyone can re-run them and check my work.

Coming: faceting, sorting, range queries, indexing throughput, vector search.

These are white-box benchmarks. Many of them are designed to measure one specific thing. Sometimes that means turning a cache off so that query execution is measured instead of a cache lookup, and sometimes it means leaving it on and deliberately getting a query cache hit to focus on some other aspect being measured. The goal is an apples to apples comparison wherever both engines have apples.

Corpora, queries, and engine settings differ from one benchmark to the next. What they have in common is the harness:

  • Every engine is driven through its public HTTP interface by the same native replay driver, so query parsing, collection, response encoding, and transport are all part of the measurement.
  • Every request is validated against every engine before anything is timed.
  • The load driver and the server run on separate sets of CPU cores, on dedicated hardware set up for repeatable numbers.
  • Each result records the engine versions, settings, corpus hash, and exact request bytes it was measured with.

SearchBench is open source under the Apache License 2.0 at github.com/luxir-search/searchbench. It supplies its own corpus and downloads the pinned Elasticsearch and OpenSearch distributions, so the only thing to bring is a Luxir binary. The quick start gets a smoke test running, and Add the reference engines brings in the other two.