facebook -- Typeahead Search
https://www.facebook.com/video/video.php?v=432864835468
首先先看演讲. 太有营养了.
1, trie .
is straight forward, but
waste space, thrashes cache.
1.points are huge.
2.points point to random place.
2. sorted vecter of name,id
.binary search finds range of prefix macthes;
.points are gone!
but . 1 sacle badly when index more terms. 2. O(n) insertion.
http://billmill.org/bloomfilter-tutorial/
http://www.stavros.io/posts/bloom-filter-search-engine/
浙公网安备 33010602011771号