JustAtech
V2EX  ›  问与答

请问发送邮件选收件人,输入首字母去匹配联系人是怎么做的?

  •  
  •   JustAtech · Apr 28, 2016 · 2684 views
    This topic created in 3680 days ago, the information mentioned may be changed or developed.

    如题.

    8 replies    2016-04-28 23:08:28 +08:00
    cxbig
        1
    cxbig  
       Apr 28, 2016
    我猜 LZ 问的是中文名首字母匹配
    中文有拼音库转换的,做好 index 就行了
    xxm459259
        2
    xxm459259  
       Apr 28, 2016
    前缀树
    JustAtech
        3
    JustAtech  
    OP
       Apr 28, 2016
    @cxbig 能具体点吗,拼音转换我知道,而且数据库里是汉字,需要把数据全部查出来吗
    JustAtech
        4
    JustAtech  
    OP
       Apr 28, 2016
    @pandachow 并不需要树,我想问的是输入和匹配的问题
    pimin
        5
    pimin  
       Apr 28, 2016 via Android
    @JustAtech 存的时候建一个辅助列 name_pinyin
    name............name_pinyin
    张小三...........zhang xiao san
    JustAtech
        6
    JustAtech  
    OP
       Apr 28, 2016
    @pimin 就你的回答靠谱些,我也是这样想的,不过是改别人的项目,没办法加不了辅助字段
    pimin
        7
    pimin  
       Apr 28, 2016   ❤️ 1
    @JustAtech
    数据库动不了就考虑前端处理.
    http://pinyin.hotoo.me
    索引范围来说,实时匹配不建议超过 50 条.
    正常人也没那么多联系人.
    JustAtech
        8
    JustAtech  
    OP
       Apr 28, 2016
    @pimin 谢谢你了 ,我现在有点思路了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5016 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 03:57 · PVG 11:57 · LAX 20:57 · JFK 23:57
    ♥ Do have faith in what you're doing.