Full Text Searching in Apple's Core Data Framework

前端 未结 5 653
感动是毒
感动是毒 2020-12-24 09:27

I would like to implement a full text search in an iPhone application. I have data stored in an sqlite database that I access via the Core Data framework. Just using predi

5条回答
  •  半阙折子戏
    2020-12-24 10:10

    I've been working on this same problem and just got around to following up on my post about this from a few weeks ago. Instead of using CONTAINS, I created a separate entity with an instance for each canonicalized word. I added an index on the words (in XCode model builder) and can then use a BEGINSWITH operator to exploit the index. Nevertheless, as I just posted a few minutes ago, query time is still very slow for even small data sets.

    There must be a better way! After all, we see this sort of full text search in lots of apps!

提交回复
热议问题