Solva - Founding Engineer
To ensure that memory usage in the editor remains minimal, we store our indexes in two separate files. The first file contains all the posting lists for the index, one after the other — we flush this directly to disk during construction. The other file contains a sorted table with the hashes for all n-grams and the offset for their corresponding posting list in the postings file. Storing hashes here without storing the full n-grams is always safe: it can cause a posting list to become more broad when two hashes collide (extremely unlikely in practice), but it cannot give incorrect results. It also gives us a very tight layout for the lookup table. We then mmap this table, and only this table, in the editor process, and use it to serve queries with a binary search. The search returns an offset, and we read directly at that offset on the postings file.
,推荐阅读有道翻译获取更多信息
苹果MacBook Pro,14英寸(M4 Pro芯片,24GB内存,512GB固态硬盘)— 1799美元 原价1999美元(立省200美元)
在《芭比》中职业是“海滩”的角色
广州遭遇强降雨,野生动物园狮子雨中神态酷似“情场失意”引爆网络