V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
nellace
V2EX  ›  iDev

ios 本地模糊检索城市名怎么做更好

  •  
  •   nellace · 2015-07-31 10:00:12 +08:00 · 2398 次点击
    这是一个创建于 3191 天前的主题,其中的信息可能已经有所发展或是发生改变。

    当前的做法是本地建了一个db文件,fmdb检索,但是中觉得还奇怪,一共不到一万的数据量,引入一个db库好蠢啊。。。。求建议

    5 条回复    2015-07-31 11:24:01 +08:00
    ma125125t
        1
    ma125125t  
       2015-07-31 10:10:07 +08:00
    plist文件存Key-Value,或者用 resource 里面的 geojson file 和strings file 存 json 或 string 都可以阿
    czheo
        2
    czheo  
       2015-07-31 10:11:36 +08:00
    那存个plist文件?
    nellace
        3
    nellace  
    OP
       2015-07-31 10:24:12 +08:00
    @ma125125t
    @czheo 存plist模糊检索好弄嘛?
    magicyu1986
        4
    magicyu1986  
       2015-07-31 11:07:19 +08:00
    做模糊检索的话,如果用了中文分词,索引很大的,都装内存里有点浪费吧,还是弄个小数据库好。
    zhicheng
        5
    zhicheng  
       2015-07-31 11:24:01 +08:00
    分词个蛋,地名你做分词?
    这事就是存 sqlite ,在地名上把可能可能的模糊匹配的词汇全部加到数据库里。效果最好,定制性最好。
    甚至以达到搜腾迅出深圳的效果。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5549 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 06:41 · PVG 14:41 · LAX 23:41 · JFK 02:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.