Join Indices for Search Engines: a Prunable Parallel Semijoin over Lucene Segments
Mikhail Khludnev
Abstract
Joins are second-class citizens in search engines: existing query-time join implementations in Lucene are limited either in performance or in capability, forcing a choice between fast joins scoped to a single index and slower joins that span independently managed indices. We carry Valduriez's join-index technique from relational systems to Lucene's flush-based (LSM-style) segment storage: for every pair of a parent and a child segment we materialize an append-only, ordinal-to-ordinal join-index column J[c]=p, avoiding any query-time translation of external variable-length keys. On top of this structure we build a semijoin algorithm that is computed per parent segment, in parallel, without a global barrier between stages; it prunes at three levels (segment-level, the first of which comes free from per-segment execution; a-priori min/max; and document-level two-phase confirmation with a lazily accumulated half-read union) so that it composes with arbitrary engine queries instead of wasting computation on matches that a sibling filter would later discard. A prototype implemented as an Apache Solr query parser, benchmarked on 1M products joined against 10M skus, cuts average query latency 5.4 times (359.8,ms vs. 1934.6,ms) relative to Solr's built-in query-time join, and the advantage widens monotonically with load, reaching 8.3 times at a concurrency of eight: on 4 vCPUs the baseline peaks at 1.18 queries/s and then loses throughput, while the join index is still gaining, at 8.04 - 6.8times the baseline's best.
Create a lesson
Related papers
Distribution-Aware Distributed Database Testing (Extended Version)
Zhou Zhou, Si Liu, Hengfeng Wei et al.
Linking Speakers of the German Parliament to Wikidata: Scope and Coverage of Metadata
Thomas Haider, Arne Cypionka, Maximilian Teich
How Can We Shrink the Family of Test Databases? Query Containment with Nulls and Comparisons
Helen Sternbach, Sara Cohen
TEAR: Table Extraction with Attribute Recommendation from Texts via Large Language Models
Tong Li, Shuye Ding, Jiachuan Wang et al.
Fast Label-Filtering Approximate Nearest Neighbor Search via Progressive Label Set Stratification
Ziqi Wang, Jingzhe Zhang, Shuo Shen et al.
FastPair: GPU-Optimized String Decoding
Joseph Isaacs, Francesco Gargiulo, Peter Boncz et al.