Recommended Services
Amazon Web Services
LeanCloud
New Relic
ClearDB
puncsky
V2EX  ›  云计算

请教 Linkedin 的开源 typeahead/autocomplete 工具 cleo 的原理

  •  
  •   puncsky · Jan 31, 2015 · 3856 views
    This topic created in 4146 days ago, the information mentioned may be changed or developed.

    解释的连接在这里:

    https://engineering.linkedin.com/open-source/cleo-open-source-technology-behind-linkedins-typeahead-search

    我的问题是,Query Walkthrough 中第二步和第三部无法理解:既然已经从 inverted index 里面取到了id,为什么还要再filter (bloomfilter快速筛选,forward index去除false positive)一下呢?为什么不直接对所有id评分排序求结果就完了呢?

    2 replies    2019-10-03 03:09:22 +08:00
    berzjackson
        1
    berzjackson  
       Jan 31, 2015   ❤️ 1
    第一步inverted index确保prefix在document里头
    第二步利用bloom filter概率上确保query在document里头,小概率存在false positive
    第三步forward index去除第二部的false positive

    另外,在Linkedin的他们这个场景里,score主要是基于popularity或者People You May Know的,和query relavence没有关系。按我的理解,这个设计的前三个步骤一方面是彻底解决query匹配,另一方面是过滤掉大量结果,只留少量document进入最后的评分排序逻辑,这样如果评分算法很复杂,例如引入了机器学习之类的东西,性能不会成为瓶颈
    puncsky
        2
    puncsky  
    OP
       Oct 3, 2019
    @berzjackson 感激,原来主要原因是有 prefix 不一定有 term,要“确保 query 在 document 里头”
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3588 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 10:40 · PVG 18:40 · LAX 03:40 · JFK 06:40
    ♥ Do have faith in what you're doing.