挺有意思的问题,void 自己的解答在这里:
https://www.voidtools.com/forum/viewtopic.php?t=9463The database is basically a list of all the file names (in UTF-8), size, date modified and pointers to parent folders.
Indexes are maintained for name, path, size and date modified.
Everything is written entirely in C.
Searches are compiled into byte code and executed.
Everything uses an optimized multi-threaded strstr search on every single filename in the database.
I wrote the Everything database specifically for filenames to be efficient as possible.
>> That means you create your own regexp engine, in C?
Basically, yes.
基本上就是优化搜索词,逐条匹配每个文件。
至于搜索结果快速排序,everything 额外维护了一个快速排序索引,所有文件已经按日期/大小等索引预排序了
https://www.voidtools.com/support/everything/indexes/