Adrien Grand's Avatar

Adrien Grand

@jpountz

#Lucene developer

61
Followers
28
Following
73
Posts
13.11.2024
Joined
Posts Following

Latest posts by Adrien Grand @jpountz

Preview
Inside Husky’s query engine: Real-time access to 100 trillion events | Datadog See how Husky enables interactive querying across 100 trillion events daily by combining caching, smart indexing, and query pruning.

It's interesting how the Elasticsearch and Datadog (www.datadoghq.com/blog/enginee...) approaches to wildcard search differ. Both use n-gram indexes, but with different strategies to contain storage amplification. Datadog hashes 4-grams while ES aggressively normalizes 3-grams.

13.10.2025 08:27 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Lucene CombinedOrHighMed queries/sec

Ge Song merged a good ~15% speedup for BM25F queries in Lucene benchmarks.mikemccandless.com/CombinedOrHi... (last data point) github.com/apache/lucen...

12.10.2025 07:15 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Vectorized evaluation of disjunctive queries In a previous blog post, I explained how Lucene significantly improved query evaluation efficiency by migrating to a vectorized execution model, and described the algorithm that Lucene uses to evaluat...

New blog: vectorized evaluation of disjunctive queries jpountz.github.io/2025/10/11/v... It explains how Lucene manages to be fast at evaluating top hits by BM25 score, even with hard queries that have only stop words or tens of terms.

11.10.2025 20:27 πŸ‘ 1 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0
Preview
BM25F from scratch BM25 run across multiple fields isn’t as simple as summing a bunch of field-level BM25 scores.

BM25F is an adjustment to BM25 that accounts for multiple fields, beating out naive summing of BM25 scores

softwaredoug.com/blog/2025/09...

18.09.2025 17:33 πŸ‘ 2 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0

Good question, I don't have a good intuition for how much comes from SIMD vs. the rest. I could run benchmarks by disabling SIMD instructions.

14.09.2025 11:36 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Luceneβ„’ Core News Apache Lucene is a high-performance, full-featured search engine library written entirely in Java. It is a technology suitable for...

Lucene 10.3 is out with 40% faster lexical search, 15% faster dense vector search and 30% faster terms dictionary lookups. lucene.apache.org/core/corenew...

14.09.2025 07:26 πŸ‘ 4 πŸ” 3 πŸ’¬ 1 πŸ“Œ 0

This is the case here: filtered term queries get a slowdown but they are still pretty fast, while harder queries like OrHighHigh (top-level disjunctive query) or FilteredOrHighHigh (likewise but with a filter) get faster.

11.09.2025 13:57 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

In case you wonder how Lucene decides whether a change is good when there is a mix of speedups and slowdowns, the general rule is that it's better to make the slow queries faster and the fast queries slower than the other way around as this results in lower tail latencies.

11.09.2025 13:57 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Lucene just bumped the block size of its postings lists from 128 to 256. This gave very good speedups (up to 45%) to most queries, and up to 10-15% slowdowns to filtered term queries. benchmarks.mikemccandless.com/2025.09.10.1...

11.09.2025 13:46 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
Adding 3-ary LongHeap to speed up collectors like TopDoc*Collectors by RamakrishnaChilaka Β· Pull Request #15140 Β· apache/lucene Description This PR updates LongHeap from a fixed 2-ary heap to a 3-ary heap (the code is generic with n-ary Heap). The change improves cache locality and reduces heap operations for larger heaps, ...

#Lucene just switched from a binary heap to a ternary heap to collect top hits by score. This helps a small bit when computing top-100 hits (~2% on the fastest queries) but up to 15% when computing top-1000 hits - thanks to better cache efficiency github.com/apache/lucen...

04.09.2025 14:04 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I just ran the Tantivy benchmark (tantivy-search.github.io/bench/) on Lucene 10.2 vs a Lucene 10.3 snapshot build. Lucene 10.2 already performed very well, but Lucene 10.3 is on another level. Very exciting.

30.08.2025 20:12 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Compilation vs. vectorization, search engine edition Virtual function calls are quite expensive, which is why database systems have been looking into ways to avoid performing one or more virtual function calls per record when processing a query. Two mai...

I just blogged about how Lucene improved query evaluation efficiency by ~40% through vectorization: jpountz.github.io/2025/08/28/c...

28.08.2025 13:10 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 1
Why you should configure an index sort on your Lucene indexes Some time ago, I wrote that β€œif you do not configure an index sort on your Lucene indexes, you are missing search-time efficiency benefits that are almost certainly worth the (low) index-time overhead...

Why you probably should configure an index sort on your Lucene indexes: jpountz.github.io/2025/07/26/w...

26.07.2025 21:06 πŸ‘ 3 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0
More on Vespa vs. Lucene/Elasticsearch In a previous post, I took a look at the Vespa vs. Elasticsearch benchmark that the Vespa people run. The results made me want to dig a little deeper to see how Vespa and Lucene/Elasticsearch differ i...

I spent some time looking at the Vespa source code to see how it compares with Lucene jpountz.github.io/2025/07/25/m...

26.07.2025 18:36 πŸ‘ 3 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0
Preview
Use branchless way to speedup filterCompetitiveHits by HUSTERGS Β· Pull Request #14906 Β· apache/lucene Description This PR is part of #14896 from the comment . Propose to modify the filterCompetitiveHits in a branchless way, hopefully we can get partially auto-vectorized. Here is the luceneutil resu...

Here's the PR: github.com/apache/lucen...

09.07.2025 06:33 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

A: The "if score >= minRequiredScore" branch is hard to predict, so this loop is expensive. This small refactoring helped the JVM take advantage of the cmov (conditional move) instruction and make this code branchless.

09.07.2025 06:31 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

This small change yielded a ~5% speedup on several queries of Lucene's nightly benchmarks (see last data point at benchmarks.mikemccandless.com/OrStopWords....). Can you guess why?

09.07.2025 06:24 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
Pre-calculate minRequiredScore to speedup filterCompetitiveHits by HUSTERGS Β· Pull Request #14827 Β· apache/lucene Description This PR propose to specialize function filterCompetitiveHits when we have exact 2 scorers, in order to reduce float calculation and potential function calls Luceneutil result on wikimed...

We're now further taking advantage of it by amortizing the cost of some operations across many doc IDs github.com/apache/lucen... or better vectorizing/pipelining other operations github.com/apache/lucen.... Expect a new round of query evaluation speedups in 10.3.

04.07.2025 11:29 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Lucene BooleanQuery (OR, high freq, medium freq term) queries/sec

Last month, Lucene changed query evaluation to work in a more term-at-a-time fashion within small-ish windows of doc IDs. This yielded a good speedup on its own (annotation IL benchmarks.mikemccandless.com/OrHighMed.html).

04.07.2025 11:28 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Lucene is getting an increasing number of high-quality contributions from ByteDance employees, especially around performance. Good to see that this project keeps attracting contributors from all around the world.

26.06.2025 15:40 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Thank you Alex

26.06.2025 15:39 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Not that I know of. But we need this kind of benchmark indeed.

26.06.2025 11:17 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Another common point I did not expect: Vespa's strict vs. unstrict iterators is quite similar to Lucene's two-phase iteration. And both projects use this feature to effectively combine dynamic pruning with filtering (a hard and underappreciated problem IMO).

25.06.2025 12:53 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
A look at the Vespa vs. Elasticsearch benchmark I was attending Berlin Buzzwords today and someone asked me about the Elasticsearch vs. Vespa comparison produced by the Vespa people, so I thought I’d publish my thoughts.

Someone asked me for my opinion on the Vespa vs. Elasticsearch performance comparison today at Berlin Buzzwords, so I gave it a try: jpountz.github.io/2025/06/17/a...

17.06.2025 20:17 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

Andrei Dan kindly captured pictures of Luca and I telling the story of how the Lucene 10 release went

16.06.2025 13:43 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Lucene FilteredOrHighMed queries/sec

Via @rmuir.org : Linux 6.15 introduced a big speedup for Lucene on AMD processors benchmarks.mikemccandless.com/FilteredOrHi... (last data point, not annotated yet) thanks to faster TLB invalidation www.phoronix.com/review/amd-i...

16.06.2025 13:34 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

Uwe now explains how Lucene takes advantage of the Panama foreign memory and vector support in spite of the fact that these features are still preview/incubating in the JDK

16.06.2025 10:21 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

Uwe Schindler gives a short history of Apache Lucene at #bbuzzz

16.06.2025 10:08 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Move HitQueue in TopScoreDocCollector to a LongHeap by gf2121 Β· Pull Request #14714 Β· apache/lucene This tries to encode ScoreDoc#score and ScoreDoc#doc to a comparable long and use a LongHeap instead of HitQueue. This seems to help apparently when i increase topN = 1000 (mikemccand/luceneutil#35...

Lucene is getting faster at deep search by switching to a more efficient heap implementation to collect top hits. github.com/apache/lucen...

06.06.2025 08:02 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Cache high-order bits of hashcode to speed up BytesRefHash by bugmakerrrrrr Β· Pull Request #14720 Β· apache/lucene Description This PR tries to utilize the unused part of the id to cache the high-order bits of the hashcode to speed up BytesRefHash. I used 1 million 16-byte UUIDs to benchmark this change, and t...

A nice optimization landed on the hash table that Lucene uses to build inverted indexes: github.com/apache/lucen.... Some previously unused bits are now used to cache hash codes, effectively making collisions cheaper to resolve.

04.06.2025 16:32 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0