2 ms·
https://en.wikipedia.org/wiki/Inverted_index https://en.wikipedia.org/wiki/Inverted_index: There are two main variants of inverted indexes: A record-level inve
by exikyut 6y ago
https://en.wikipedia.org/wiki/Inverted_index https://en.wikipedia.org/wiki/Inverted_index:
There are two main variants of inverted indexes: A record-level inverted index (or inverted file index or just inverted file) contains a list of references to documents for each word. A word-level inverted index (or full inverted index or inverted list) additionally contains the positions of each word within a document.
TL;DR, for every (key)word, list its file and position. A smart IDE implementation would also need to take file rename and move into account, and translate byte positions to line numbers for quick jump-to-file.