zh1997
V2EX  ›  问与答

求一个检索功能的轮子

  •  1
     
  •   zh1997 · Jul 28, 2020 · 1829 views
    This topic created in 2167 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   ·   1077 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 90ms · UTC 18:37 · PVG 02:37 · LAX 11:37 · JFK 14:37
    ♥ Do have faith in what you're doing.