Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Full Text Search on iOS5, iOS6 Unicode (Russian, Japanese, Chinese, Korean)

I need to search within 2.000.000 database rows containing titles e.g. Songs. I need a solution that provides results fast, works on the iOS platform and supports the unicode charset. I am thinking about using sqlite's FTS to solve my problem. I am open for any other solutions.

This is what I know so far:

Assumption 1: FTS is enabled by default in iOS >= 5 - this is fine, my minimum requirement is 5

Assumption 2: I assume, that unicode folding (Ä => a) does not work without compiling sqlite on my own

Assumption 3: I know that FTS does not support substring searches like MATCH "*searchterm*"

Assumption 4: I read that the default porter stemmer is pretty bad with unicode charsets (Russian, Japanese, Chinese, ...)

My current approach is using LIKE "%searchterm%" statements, because they work best with the languages above. Unfortunately they tend to be slow sometimes.

Questions

Question 1: Is sqlite with FTS the right way to go? Or should investigate in cLucene / CoreData, etc? What are the other options? What is the best way to search through titles in different languages on the iOS platform?

Question 2: Do I need to replace the tokenizer? Can I load the tokenizer as an extension on the iOS platform? Might this be the solution?

Question 3: Is sqlite fts enabled with the ICU extensions on iOS 5 / 6?

Question 4: How does Apple's internal search work e.g. in the music player? CoreData?

like image 776
bobbyR Avatar asked Feb 08 '13 10:02

bobbyR


1 Answers

You probably want to check this: Full Text Search w/ Core Data

like image 60
Daniel Eggert Avatar answered Oct 04 '22 11:10

Daniel Eggert