{"html_url": "https://github.com/simonw/datasette/issues/292#issuecomment-423543060", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/292", "id": 423543060, "node_id": "MDEyOklzc3VlQ29tbWVudDQyMzU0MzA2MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-09-21T14:06:31Z", "updated_at": "2018-09-21T14:09:06Z", "author_association": "OWNER", "body": "I keep on finding new reasons that I want this.\r\n\r\nThe latest is that I'm playing with the more advanced features of FTS5 - in particular the highlight() function and the ability to sort by rank.\r\n\r\nThe problem is... in order to do this, I need to properly join against the `_fts` table. Here's an example query:\r\n\r\n select\r\n highlight(events_fts, 0, '', ''),\r\n events_fts.rank,\r\n events.*\r\n from events\r\n join events_fts on events.rowid = events_fts.rowid\r\n where events_fts match :search \r\n order by rank\r\n\r\nNote that this is a different query from the usual FTS one (which does `where rowid in (select rowid from events_fts...)`) because I need the rank column somewhere I can sort against.\r\n\r\nI'd like to be able to use this on the table view page so I can get faceting etc for free, but this is a completely different query from the default. Maybe I need a way to customize the entire query? That feels weird though - why am I not using a view in that case?\r\n\r\nAnswer: because views can't accept `:search` style parameters. I could use a canned query, but canned queries don't get faceting etc.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 326800219, "label": "Mechanism for customizing the SQL used to select specific columns in the table view"}, "performed_via_github_app": null}