~/lightning

Lightning Talk: Searching with C++ - A Fulltext Index Search Algorithm

Lightningat C++Now 2023 · 2023-05-07..05-12· [c-and-cpp]
slides:none on file

Shows a small fulltext index implemented in modern C++ using string_view and ranges, transforming a needle into n‑grams ("engrams") and mapping each gram to a multiset of index entries with offsets. Insert/remove update iterators into the original multiset; search picks the smallest posting list (36 hits) to start, converts postings to relative positions, and repeatedly intersects lists by offset to produce exact matches. Code is on the slides repo and the algorithm demonstrably returns hits for real targets like cppreference and the C++ standard.

AI-written summary · about

  1. 0:00Introduction
  2. 0:49Structure
  3. 1:55GetPositionSet
  4. 2:29Engrams
  5. 3:04Relative
  6. 3:53Search
  7. 4:15Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.