String faceting benchmarks: Luxir vs Elasticsearch and OpenSearch
Faceting is the part of search I’ve always had the most fun working on, from Solr’s original faceting to the JSON Facet API, so it’s the benchmark I most wanted to publish after full-text search. Jason Seeley wrote the first versions of Luxir’s faceted search, and it was already faster than OpenSearch/Elasticsearch before I continued optimizing it. He graduated from Purdue with a degree in Computer Science recently and has just started his job search, so ping him if your hiring and think he’d be a fit.
The full results for string field faceting are at Elasticsearch vs OpenSearch vs Luxir: String Faceting Benchmarks.
The short version:
- Luxir was faster than both in all 42 cells. With a filter, it was 3.3 to 145 times OpenSearch’s throughput and 3.7 to 127 times Elasticsearch’s, with a median of 12 and 14 times.
- The closest race is a filter matching millions of documents on a field with up to 99,000 values, at 3.3x to 5.6x.
- The widest gaps are selective filters on fields with many values. When fewer than 1,000 documents match, Elasticsearch’s and OpenSearch’s cost per request still grows with the number of values in the field, to 7 or 8 ms on a 2 million value field. Luxir’s stays at or under 0.05 ms.
- Elasticsearch and OpenSearch are within 25% of each other in most cells. OpenSearch is far faster on the 1,000-value field with a selective filter or none. There’s a separate page comparing just those two.
One result surprised me more than the margins. Elasticsearch and OpenSearch each have groups of cells that run fast in some launches and nearly 2x slower in others, with the same build, index, and requests. A slow launch stays slow through its whole run. OpenSearch came up slow on its high-cardinality fields in 15 of 30 launches. Luxir’s six launches were within 1.6% of each other in the typical cell. The page has the details, and the charts use each engine’s fastest launch for every cell.
As always, the harness is open source, and the results page lists the engine settings, the exact requests, and what was done to give Elasticsearch and OpenSearch their best showing.
