Search code examples
c++calgorithmfull-text-searchinverted-index

What are the algorithms for real-time search engine?


Inverted index is designed to be fast for searching but not that easy for updating. So far as I know incremental index is used to update inverted index data.

So what are the algorithms or main concepts of real-time searching, how did they do that?


Solution

  • Real-time search can still use an inverted index. You have to maintain this index in a form that can be both efficiently updated and queried, of course, which doesn't come free - but it's certainly doable. Another common technique is to have multiple indexes - one master index (updated frequently), and some overlay (or patch) indices that only record things that have changed since the last master index.