Search Typeahead Q: How would a typical write work in this trie?
It appears to me this algorithm doesn't solve the problem if a word's frequency dropped. E.g.
i'm kinda confused here. is everything in the memory? or the "pointer" actually refers to the index in the DB?
We store the top 5 queries in each node. Its possible that this particular search query jumped into the top 5 queries of a few other nodes. - I did not ustand how? sine search begin at a node and will always traverse through the same nodes for similar searches, how will it become the top 5 queries for other nodes?
Parent pointer is not needed. We can traverse tree from root to new leaf while updating top 5. Trie persistency is an important question and should be discussed here.