1

像这样的功能 谷歌自动完成

例如,我有一个名为人名的字段,当用户输入时,我们将显示与用户输入匹配的所有选项。

我的第一个问题:

which one should maintain trie tree, frontend, backend or both?

第二个问题:

No matter front end or back end, when will trie tree be loaded?
If trie loaded on start, million of entities loaded take a lot time, and huge data in memory.
If trie loaded once user searched, each time user typed is a DB call and a Rest call, which also consumme a lot resources. And at first search, user will see no options till he did once, which is bad user experience.

如果你有想法,期待知道!

4

0 回答 0