{"id":17972323,"url":"https://github.com/dagronf/dsffulltextsearchindex","last_synced_at":"2025-08-21T03:21:21.909Z","repository":{"id":63907292,"uuid":"258950622","full_name":"dagronf/DSFFullTextSearchIndex","owner":"dagronf","description":"A simple Swift/Objective-C full text search (FTS) class for iOS/macOS/tvOS","archived":false,"fork":false,"pushed_at":"2020-11-03T05:39:41.000Z","size":25,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-06T14:11:10.466Z","etag":null,"topics":["fts","full-text-search","ios","macos","objective-c","sqlite","swift","tvos"],"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/dagronf.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":"2020-04-26T05:49:14.000Z","updated_at":"2024-11-20T21:30:23.000Z","dependencies_parsed_at":"2022-11-28T22:54:17.711Z","dependency_job_id":null,"html_url":"https://github.com/dagronf/DSFFullTextSearchIndex","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/dagronf/DSFFullTextSearchIndex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FDSFFullTextSearchIndex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FDSFFullTextSearchIndex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FDSFFullTextSearchIndex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FDSFFullTextSearchIndex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dagronf","download_url":"https://codeload.github.com/dagronf/DSFFullTextSearchIndex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagronf%2FDSFFullTextSearchIndex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271420181,"owners_count":24756495,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["fts","full-text-search","ios","macos","objective-c","sqlite","swift","tvos"],"created_at":"2024-10-29T16:12:01.916Z","updated_at":"2025-08-21T03:21:21.880Z","avatar_url":"https://github.com/dagronf.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DSFFullTextSearchIndex\n\nA simple iOS/macOS/tvOS full text search (FTS) class using SQLite FTS5 using a similar API as SKSearchKit with no external dependencides\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/tag/dagronf/DSFFullTextSearchIndex\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/macOS-10.11+-red\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/iOS-11.0+-blue\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/tvOS-11.0+-orange\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/macCatalyst-1.0+-yellow\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Swift-5.0-orange.svg\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-lightgrey\" /\u003e\n    \u003ca href=\"https://swift.org/package-manager\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/spm-compatible-brightgreen.svg?style=flat\" alt=\"Swift Package Manager\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## Why\n\nI wanted to add a full text search index to my macOS/iOS application and realized that SKSearchKit (and thus [DFSearchKit](https://github.com/dagronf/DFSearchKit) is macOS only. \n\nSQLite has solid FTS capabilities via and I wanted to be able to use these in a similar way as SKSearchKit.  I also wanted a simple wrapper that **didn't have any dependencies**.  As much as I love [GRDB](https://github.com/groue/GRDB.swift) I certainly didn't need everything that it provides.\n\nI also wanted something that can both :-\n\n* work independently in an app that doesn't have a traditional database, and\n* work in an app with an existing SQLite database.\n* be able to be shared between applications on iOS, macOS, macOS (Catalyst) and tvOS.\n\n## Simple example\n\n```swift\n\n// Create an index\n\nlet index = DSFFullTextSearchIndex()\nindex.create(filePath: /* some file path */)\n\n//\n// Add some documents\n//\nlet url1 = URL(string: \"demo://maintext/1\")\nindex.add(url: url1, text: \"Sphinx of black quartz judge my vow\")\n\nlet url2 = URL(string: \"demo://maintext/2\")\nindex.add(url: url2, text: \"Quick brown fox jumps over the lazy dog\")\n\nlet url3 = URL(string: \"demo://maintext/3\")\nindex.add(url: url3, text: \"The dog didn't like the bird sitting on the fence and left quietly\")\n\n//\n// Search\n//\nlet urls1 = index.search(text: \"quartz\")   // single match - url1\nlet urls2 = index.search(text: \"quick\")    // single match - url2\nlet urls3 = index.search(text: \"dog\")      // two matches - url1 and url3\n\n// Search with a wildcard\nlet urls4 = index.search(text: \"qu*\")       // three matches = url1 (quartz), url2 (quick) and url3 (quietly)\n\n```\n\n## API documentation\n\n- [DSFFullTextSearchIndex](DSFFullTextSearchIndex.md)\n\nGenerated using [swift-doc](https://github.com/SwiftDocOrg/swift-doc).\n\n\n## To do\n\n* Add a custom tokenizer to more accurately handle stop words and CJK\n* Character folding etc.\n* A ton of more stuff too.\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2020 Darren Ford\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdagronf%2Fdsffulltextsearchindex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdagronf%2Fdsffulltextsearchindex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdagronf%2Fdsffulltextsearchindex/lists"}