<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Lucene on digitalitem: Claude skills library and product lab</title><link>https://digitalitem.online/en/tags/lucene/</link><description>Recent content in Lucene on digitalitem: Claude skills library and product lab</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 20 Oct 2026 13:15:00 +0000</lastBuildDate><atom:link href="https://digitalitem.online/en/tags/lucene/index.xml" rel="self" type="application/rss+xml"/><item><title>Lucene's Search Execution: impacts, WAND and MAXSCORE</title><link>https://digitalitem.online/en/posts/lucene-search-execution/</link><pubDate>Tue, 20 Oct 2026 13:15:00 +0000</pubDate><guid>https://digitalitem.online/en/posts/lucene-search-execution/</guid><description>&lt;p&gt;The previous post covered the performance fight. This one goes inside the executor: how a query runs from &lt;code&gt;Weight&lt;/code&gt; to &lt;code&gt;Scorer&lt;/code&gt; to &lt;code&gt;DocIdSetIterator&lt;/code&gt;, and what impacts, WAND and MAXSCORE each solve.&lt;/p&gt;
&lt;h2 id="1-the-execution-skeleton"&gt;1. The execution skeleton&lt;/h2&gt;
&lt;p&gt;Lucene executes a query as a tree:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Query → Weight (reusable scoring logic)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; → Scorer (one per segment)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; → DocIdSetIterator (iterate docs) + score function
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Weight&lt;/strong&gt;: segment-independent &amp;ldquo;how to score&amp;rdquo;;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scorer&lt;/strong&gt;: segment-specific &amp;ldquo;which docs to score&amp;rdquo;;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DISI&lt;/strong&gt;: only &lt;code&gt;nextDoc()&lt;/code&gt; / &lt;code&gt;advance(doc)&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The naive execution: walk each clause&amp;rsquo;s postings, intersect/union, score each doc. Slow but correct.&lt;/p&gt;</description></item><item><title>Writing a Search Engine from Scratch: Rewriting Lucene in C++</title><link>https://digitalitem.online/en/posts/writing-a-search-engine/</link><pubDate>Tue, 20 Oct 2026 12:55:00 +0000</pubDate><guid>https://digitalitem.online/en/posts/writing-a-search-engine/</guid><description>&lt;p&gt;A search engine looks like &amp;ldquo;inverted index plus TF-IDF&amp;rdquo; — until you try to make it agree with Lucene &lt;strong&gt;bit for bit&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This series records an attempt to rewrite Lucene 10.4 in C++. Not a toy: Java must be able to read a C++-written index (&lt;code&gt;CheckIndex OK&lt;/code&gt;), the same queries must return &lt;strong&gt;the same documents and the same score bits&lt;/strong&gt;, and performance must land in the same ballpark.&lt;/p&gt;
&lt;h2 id="1-why-rewrite"&gt;1. Why rewrite&lt;/h2&gt;
&lt;p&gt;The point isn&amp;rsquo;t reinventing a wheel. It&amp;rsquo;s three things:&lt;/p&gt;</description></item><item><title>Rewriting Lucene in C++ (Part 4): The Writer and the Long Tail — From 59% to 100% Coverage</title><link>https://digitalitem.online/en/posts/lucene-cpp-writer-coverage/</link><pubDate>Tue, 20 Oct 2026 07:30:00 +0000</pubDate><guid>https://digitalitem.online/en/posts/lucene-cpp-writer-coverage/</guid><description>The writer went from 7GB of RAM to 398MB, with merge and append output byte-identical to a single-pass write; coverage went from 59.3% to 100% via a gap list and a gate that can&amp;#39;t go vacuous.</description></item><item><title>Rewriting Lucene in C++ (Part 3): From 128 to 592 QPS — The Search Performance Fight</title><link>https://digitalitem.online/en/posts/lucene-cpp-search-perf/</link><pubDate>Tue, 20 Oct 2026 07:20:00 +0000</pubDate><guid>https://digitalitem.online/en/posts/lucene-cpp-search-perf/</guid><description>Correct doesn&amp;#39;t mean usable: at 1M docs the C++ port had 1/5 of Java&amp;#39;s throughput. Impacts, WAND, minCompetitiveScore, two-phase advancing — closing the gap to 1.09x.</description></item><item><title>Rewriting Lucene in C++ (Part 2): Bit-Exact Scoring — The Floating-Point Traps of BM25</title><link>https://digitalitem.online/en/posts/lucene-cpp-scoring/</link><pubDate>Tue, 20 Oct 2026 07:10:00 +0000</pubDate><guid>https://digitalitem.online/en/posts/lucene-cpp-scoring/</guid><description>If scores differ by one ULP, the ranking can flip; if the ranking flips, verification becomes meaningless. The traps on the road to &amp;#39;identical score bits&amp;#39;.</description></item><item><title>Rewriting Lucene in C++ (Part 1): Byte-Level Compatibility — When Java Reads a C++-Written Index</title><link>https://digitalitem.online/en/posts/lucene-cpp-format/</link><pubDate>Tue, 20 Oct 2026 07:00:00 +0000</pubDate><guid>https://digitalitem.online/en/posts/lucene-cpp-format/</guid><description>Not inventing a format, but cloning Lucene 10.4&amp;#39;s on-disk format: so Java CheckIndex accepts a C++-written index and C++ reads a Java-written one byte-for-byte identically.</description></item></channel></rss>