Sphinx and “did you mean … ?” suggestions idea. WIll it work?

前端 未结 3 1452
迷失自我
迷失自我 2021-01-18 18:21

I\'m trying to come up with the fastest way to make search suggestions. At first I thought a Levenstein UDF function combined with a mysql table would do the job. But using

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-18 19:12

    I can't see a problem with your idea. Go for it. Just to point out that your method is only relevant if you want to override the builtin behaviour that is very similar to LD.

    For example, with sphinx 1.10-beta, you can specify min_infix_len and expand_keywords and use sphinx's builtin weighting methods (BM25 and some proprietary code) for good results. http://sphinxsearch.com/blog/2010/08/17/how-sphinx-relevance-ranking-works/

    Don't forget to memcache these queries, and create a warm-up script.

提交回复
热议问题