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.
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.
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?
You probably want to check this: Full Text Search w/ Core Data
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With