Glad you found it helpful! : ) Stay tuned for more of these.
@TheodoreTaylor-mq8yi
6 ай бұрын
2 times 4:17 @@irtizahafiz
@SupriyaBaruQA
5 ай бұрын
Amazing
@irtizahafiz
4 ай бұрын
Thank you! Cheers!
@nimageofmine
Жыл бұрын
how do you handle auto suggest with multiple tokens. E.g. "how does auto suggest work in google"?
@user-fw2wn4ib3d
9 ай бұрын
Very nicely explained here . Thx . Just a question on choice of data store , why casandara as its not even a key-value store ?
@LuluHou
Жыл бұрын
great design! thanks a lot! just one question hope you could help. generating trie is kind of distributed right? for example, a-bi, bj-cid...,suppose pefix sorted. each sub-trie contributes to hashmap construction, it is possible that lower level sub-trie could overlap on higher level prefix key. and a heap could be used to filter out top k frequency. is my understanding right?
@irtizahafiz
10 ай бұрын
Hi! Unfortunately, I don't know too much about tries. It's been a while since I took Data Structures, haha. Hopefully someone else can help answer here.
@turtleoctopusdog3792
9 ай бұрын
freaking awsome
@ManojReddy22
3 ай бұрын
How do we handle frequency in case of trie. i want to only return top 10 most frequent suggestions
@fancyAlex1993
3 ай бұрын
So I have two questions 1. If we are going for the TRIE data structure then there is no need for the table 3:23 right, we just build the TRIE ds and store it in the DB. From there, we can either serve the data either from the DB or cache right ? 2. Every once a week, we can run a Cron job to execute a spark job which will take whatever there is in our logs and update our TRIE data structure and update it in our DB. Is my understanding correct ?
@gowthamannachiappan706
4 ай бұрын
Thanks for the awesome video. Should we use Graph database Neo4j or something to store the Trie data structure?
@irtizahafiz
4 ай бұрын
Not too familiar with Neo4j unfortunately, but I hope someone else can help you out here.
@nishpatwa007
2 жыл бұрын
Did not understand the part on how Trie is stored in Cassandra? Can you throw some light there?
@irtizahafiz
2 жыл бұрын
Hi! Sure. So as part of the optimization, for every Trie node, we are storing all the leaf nodes you could reach from that node. Let’s say we have a node with prefix “ca”. Some leaf nodes you could reach from this node are: canada, cat, can, cambodia, etc. So in the Trie node “ca” we can store all those leaf nodes. And then we can store that Trie node in Cassandra with the key being “ca”. Now, if you want to find all the leaf nodes for the node “ca”, instead of parsing the tree, you can just query Cassandra for primary key “ca”.
@user-eq4oy6bk5p
2 жыл бұрын
@@irtizahafiz In order to parse Trie, don't you have to build the Trie first? How do you build it if it doesn't fit in main memory?
@stylishskater92
Жыл бұрын
@@user-eq4oy6bk5p I would like to know this as well
@ketheric
11 ай бұрын
If you're going to store the data in Cassandra, you don't need a trie...
@irtizahafiz
10 ай бұрын
I don't think that's what I meant in the video. I was trying to give an idea of how Tries can be used.
@luh-lat
2 ай бұрын
Okay there are several gaps. When dealing with large scale data you'll likely need to partition your tries. If you partition. Your tries how do you partition them? If you partition your tries by hash of the full search queries they represent then it will be tricky because it will be hard for you to determine from a prefix what partition to go to? The prefix 's hash could send you to a totally different partition
@leamon9024
11 ай бұрын
Hi, thanks for sharing. Is it possible to use elasticsearch here instead of cassandra?
@irtizahafiz
10 ай бұрын
Yes. There are multiple ways you can implement an autocomplete feature. This is just one of them, and also at a very high level.
@user-vm8yn4hb4w
2 жыл бұрын
damn good man
@wellaide
Жыл бұрын
Thanks for sharing. However, I do feel there are more nuances than simply using a trie structure. For example, how can each user's personal interest be reflected? What if some users start with uncommon query which isn't stored in the database but the intent can be clearly predicted?
@irtizahafiz
9 ай бұрын
Yes definitely! This is just a high level idea.
@bulgakovwork2022
Жыл бұрын
Sorry, but how hashmap will exist? the key is a letter and the value is a list of words or a list of next letters?
@irtizahafiz
Жыл бұрын
Key will be the prefix, value will be list of possible search terms in some order.
Пікірлер: 35