FB search框架 Php写的Browse layer,负责同client对话以及param处理和passing等。 C++写的backend,最大的一坨叫作TopAggregator,主要负责三件事 a)rewrite query to get better search results (e.g. force retrieval); b)和每一个vertical的RackAggregator对话,好比posts,web,people等,从这些分支收集response; c)对response作twiddling,因此有一堆twiddlers好比web twiddler 每一个RackAggregator作的事主要就是和index对话,从各个shards拿结果(用reverse index作retrieval, top m, determined by static rank),以及score results(用forward index / docdata作ranking)。 而后再返回php的middle tier,作caching, privacy check等等。
Forward index和Reverse index f index主要是给id找doc,r index主要是给出terms找list<doc(id)>
index build: 也是分batch pipeline (base index build)和live update pipeline (realtime)。