github
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/sqlite-utils/issues/220#issuecomment-783662968 | https://api.github.com/repos/simonw/sqlite-utils/issues/220 | 783662968 | MDEyOklzc3VlQ29tbWVudDc4MzY2Mjk2OA== | 649467 | 2021-02-22T20:44:51Z | 2021-02-22T20:44:51Z | NONE | Actually, coming back to this, I have a clearer use case for enabling fts generation for views: making it easier to bring in text from lookup tables and other joins. The datasette documentation describes populating an fts table like so: ``` INSERT INTO "items_fts" (rowid, name, description, category_name) SELECT items. rowid, items.name, items.description, categories.name FROM items JOIN categories ON items.category_id=categories.id; ``` Alternatively if you have fts support in sqlite_utils for views (which sqlite and fts5 support), you can do the same thing just by creating a view that captures the above joins as columns, then creating an fts table from that view. Such an fts table can be created using sqlite_utils, where one created with your method can't. The resulting fts table can then be used by a whole family of related tables and views in the manner you described earlier in this issue. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
783778672 | |
https://github.com/simonw/sqlite-utils/issues/220#issuecomment-759098964 | https://api.github.com/repos/simonw/sqlite-utils/issues/220 | 759098964 | MDEyOklzc3VlQ29tbWVudDc1OTA5ODk2NA== | 9599 | 2021-01-12T23:19:55Z | 2021-01-12T23:19:55Z | OWNER | I don't think it makes sense to call `.enable_fts()` on a view does it? When I'm working with views and FTS I tend to write my queries against a FTS table for one of the tables that is used by the view - https://docs.datasette.io/en/stable/full_text_search.html#configuring-full-text-search-for-a-table-or-view describes how I do that in Datasette for example. Can you expand on your use-case for FTS and views? I'm ready to be convinced otherwise, but I don't see how it would work right now. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
783778672 |