{"id": 321631020, "node_id": "MDU6SXNzdWUzMjE2MzEwMjA=", "number": 253, "title": "Documentation explaining how to use SQLite FTS with Datasette", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2018-05-09T16:02:08Z", "updated_at": "2018-05-12T12:09:02Z", "closed_at": "2018-05-12T12:06:51Z", "author_association": "OWNER", "pull_request": null, "body": "In particular how to work with https://www.sqlite.org/fts3.html#_external_content_fts4_tables_ - which Datasette can automatically detect and use to add a search UI to your page.\r\n\r\nExamples of basic search setup like this:\r\n\r\n```\r\nCREATE VIRTUAL TABLE \"interests_fts\"\r\n USING FTS4 (name, content=\"interests\");\r\nINSERT INTO \"interests_fts\" (rowid, name)\r\n SELECT rowid, name FROM interests;\r\n```\r\n\r\nAnd complex join-based search setup like this:\r\n\r\n```\r\nCREATE VIRTUAL TABLE \"interests_fts\"\r\n USING FTS4 (name, category, member, content=\"interests\");\r\nINSERT INTO \"interests_fts\" (rowid, name, category, member)\r\n SELECT interests.rowid, interests.name, interest_categories.name, members.name\r\n FROM interests\r\n JOIN interest_categories ON interests.category_id = interest_categories.id\r\n JOIN members ON interests.member_id = members.id;\r\n```\r\n\r\nAlso mention how `csvs-to-sqlite` can be used to do this easily.\r\n\r\nThis will benefit from #252 ", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/253/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 321624016, "node_id": "MDU6SXNzdWUzMjE2MjQwMTY=", "number": 252, "title": "/-/versions should report the FTS version supported by SQLite", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 0, "created_at": "2018-05-09T15:43:47Z", "updated_at": "2018-05-11T13:19:52Z", "closed_at": "2018-05-11T13:19:52Z", "author_association": "OWNER", "pull_request": null, "body": "I can copy this function from `csvs-to-sqlite`: https://github.com/simonw/csvs-to-sqlite/blob/dccbf65b37bc9eed50e9edb80a42f257e93edb1f/csvs_to_sqlite/utils.py#L283-L293", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/252/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"}