CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

Tong 0.0.6

Tong 0.0.6

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Sep 2017
SwiftSwift Version 4.0
SPMSupports SPM

Maintained by 1amageek.



 
Depends on:
APIKit>= 0
ElastiQ>= 0
 

Tong 0.0.6

Tong is library for using ElasticSearch with Swift.

Tong depends on ElastiQ.

Usage

Configure in AppDelegate

Tong.Configure.setup(url: "URL", user: "user", password: "password", isEncrypted: false)

Make Object conforming to Searchable

class Post: Object, Searchable {
    static var _index: String {
        return "v1"
    }

    static var _type: String {
        return "post"
    }

    // Anything
}

Search

let query: ElastiQ = ElastiQ().term("_createdAt", 1503396721450)
Post.search(query: query) { (result) in
    switch result {
    case .success(let response): print(response)
    case .failure(let error): print(error)
    }
}

Reference

  • Salada Firebase model framework.
  • Tong Tong is library for using ElasticSearch with Swift.
  • dressing Dressing provides the functionality of CloudFunctions to connect Firebase and ElasticSearch.