{"id":23152414,"url":"https://github.com/1amageek/tong","last_synced_at":"2026-05-09T10:11:06.027Z","repository":{"id":56924382,"uuid":"101166393","full_name":"1amageek/Tong","owner":"1amageek","description":"Tong is library for using ElasticSearch with Swift.","archived":false,"fork":false,"pushed_at":"2017-09-05T07:05:41.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-24T16:42:51.942Z","etag":null,"topics":["elasticsearch","firebase","salada"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1amageek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-23T10:07:44.000Z","updated_at":"2017-09-05T03:09:04.000Z","dependencies_parsed_at":"2022-08-21T05:20:57.277Z","dependency_job_id":null,"html_url":"https://github.com/1amageek/Tong","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1amageek%2FTong","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1amageek%2FTong/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1amageek%2FTong/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1amageek%2FTong/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1amageek","download_url":"https://codeload.github.com/1amageek/Tong/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247206966,"owners_count":20901555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elasticsearch","firebase","salada"],"created_at":"2024-12-17T19:14:37.598Z","updated_at":"2026-05-09T10:11:05.954Z","avatar_url":"https://github.com/1amageek.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tong\n\nTong is library for using ElasticSearch with Swift.\n\nTong depends on [ElastiQ](https://github.com/sgr-ksmt/ElastiQ).\n\n## Installation\n\n#### [CocoaPods](https://github.com/cocoapods/cocoapods)\n\n- Insert `pod 'Tong' ` to your Podfile.\n- Run `pod install`.\n\nNote: CocoaPods 1.3.1 is required to install Tong.\n\n## Usage\n\nConfigure in AppDelegate\n\n`Tong.Configure.setup(url: \"URL\", user: \"user\", password: \"password\", isEncrypted: false)`\n\nMake Object conforming to Searchable\n``` swift\nclass Post: Object, Searchable {\n    static var _index: String {\n        return \"v1\"\n    }\n\n    static var _type: String {\n        return \"post\"\n    }\n\n    // Anything\n}\n```\n\n### Search\n\n``` swift\nlet query: ElastiQ = ElastiQ().term(\"_createdAt\", 1503396721450)\nPost.search(query: query) { (result) in\n    switch result {\n    case .success(let response): print(response)\n    case .failure(let error): print(error)\n    }\n}\n```\n\n# Reference\n\n- [Salada](https://github.com/1amageek/Salada) Firebase model framework.\n- [Tong](https://github.com/1amageek/Tong) Tong is library for using ElasticSearch with Swift.\n- [dressing](https://github.com/1amageek/dressing) Dressing provides the functionality of CloudFunctions to connect Firebase and ElasticSearch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1amageek%2Ftong","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1amageek%2Ftong","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1amageek%2Ftong/lists"}