Skip to content

anysome/RealmFuse

Repository files navigation

RealmFuse

CI Status Version License Platform

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)

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

RealmFuse is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'RealmFuse'

Author

Layman, anysome@gmail.com

License

RealmFuse is available under the MIT license. See the LICENSE file for more info.

About

Realm fuzzy searching

Resources

License

Stars

Watchers

Forks

Packages

No packages published