Provide Fuse search api in Realm
Define properities to search
extension PostModel: Fuseable {
var fuseProperties: [FuseProperty] {
return [
FuseProperty(name: "title", weight: 0.34),
FuseProperty(name: "content", weight: 0.66)
]
}
}Run query
var results = realm.objects(PostModel.self).fuseSearch(searchText)To run the example project, clone the repo, and run pod install from the Example directory first.
RealmFuse is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'RealmFuse'Layman, anysome@gmail.com
RealmFuse is available under the MIT license. See the LICENSE file for more info.