TestsTested | ✗ |
LangLanguage | CC |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Francis Chong.
Depends on: | |
FMDB/standalone | >= 0 |
sqlite3 | >= 0 |
CocoaLumberjack | >= 0 |
A simple Objective-C full text search engine with CJK support.
Use CocoaPods, add following to your Podfile
pod 'IGSearch'
Run pod install
and you're off!
First, create a database.
IGSearch* search = [[IGSearch alloc] initWithPath:aPath];
Then, index documents.
[search indexDocument:@{@"title": @"Street Fighter 4", @"system": @"Xbox 360"} withId:@"1"];
[search indexDocument:@{@"title": @"Super Mario Bros", @"system": @"NES"} withId:@"2"];
[search indexDocument:@{@"title": @"Sonic", @"system": @"Mega Drive"} withId:@"3"];
[search indexDocument:@{@"title": @"Mega Man", @"system": @"NES"} withId:@"4"];
Search the document is simple:
[search search:@"Street"]; // @[ @{@"title": @"Street Fighter 4", @"system": @"Xbox 360"} ]
[search search:@"Mega" withField:@"title"]; // @[ @{@"title": @"Mega Man", @"system": @"NES"} ]
Or search only the document ID:
[search search:@"Mega" withField:@"title" fetchIdOnly:YES]; // @[ @"4" ]
Use SQLite porter stemmer from Mozilla Thunderbird, Mozilla Public License.
This software is licensed in MIT License.