efficient serverside autocomplete

后端 未结 3 435
醉梦人生
醉梦人生 2021-02-01 10:10

First off all I know:

Premature optimization is the root of all evil

But I think wrong autocomplete can really blow up your site.

3条回答
  •  野的像风
    2021-02-01 10:43

    Using SQL versus Solr's terms component is really not a comparison. At their core they solve the problem the same way by making an index and then making simple calls to it.

    What i would want to know is "what you are trying to auto complete".

    Ultimately, the easiest and most surefire way to scale a system is to make a simple solution and then just scale the system by replicating data. Trying to cache calls or predict results just make things complicated, and don't get to the root of the problem (ie you can only take them so far, like if each request missed the cache).

    Perhaps a little more info about how your data is structured and how you want to see it extracted would be helpful.

提交回复
热议问题