zh1997
V2EX  ›  问与答

求一个检索功能的轮子

  •  1
     
  •   zh1997 · Jul 28, 2020 · 1778 views
    This topic created in 2137 days ago, the information mentioned may be changed or developed.
    数据的结构如下:
    {
    "time":"时间",
    "tel":"手机",
    "magic":"魔法"
    }

    要求:

    1. 按单个字符分词 (不考虑词组的情况)

    输入:t 输出 : time 时间 , tel 手机

    2. 多个字符检索时需要符合顺序

    输入:tim 输出 : time 时间

    输入 : tmi 输出 null

    3. 匹配的字符占比越多权重越高
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5338 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 07:40 · PVG 15:40 · LAX 00:40 · JFK 03:40
    ♥ Do have faith in what you're doing.