{"html_url": "https://github.com/dogsheep/dogsheep-beta/issues/26#issuecomment-695879531", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-beta/issues/26", "id": 695879531, "node_id": "MDEyOklzc3VlQ29tbWVudDY5NTg3OTUzMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-21T02:55:28Z", "updated_at": "2020-09-21T02:55:54Z", "author_association": "MEMBER", "body": "Actually for the tie-breaker it should be something like https://latest.datasette.io/fixtures?sql=select+pk%2C+created%2C+planet_int%2C+on_earth%2C+state%2C+city_id%2C+neighborhood%2C+tags%2C+complex_array%2C+distinct_some_null+from+facetable+where+%28created+%3E+%3Ap1+or+%28created+%3D+%3Ap1+and+%28%28pk+%3E+%3Ap0%29%29%29%29+order+by+created%2C+pk+limit+11&p0=10&p1=2019-01-16+08%3A00%3A00\r\n```sql\r\nwhere\r\n (\r\n created > :p1\r\n or (\r\n created = :p1\r\n and ((pk > :p0))\r\n )\r\n )\r\n```\r\nBut with `rowid` and `timestamp` in place of `pk` and `created`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 705215230, "label": "Pagination"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/dogsheep-beta/issues/26#issuecomment-695879237", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-beta/issues/26", "id": 695879237, "node_id": "MDEyOklzc3VlQ29tbWVudDY5NTg3OTIzNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-21T02:53:29Z", "updated_at": "2020-09-21T02:53:29Z", "author_association": "MEMBER", "body": "If previous page ended at `2018-02-11T16:32:53+00:00`:\r\n```sql\r\nselect\r\n search_index.rowid,\r\n search_index.type,\r\n search_index.key,\r\n search_index.title,\r\n search_index.category,\r\n search_index.timestamp,\r\n search_index.search_1\r\nfrom\r\n search_index\r\n where \r\n date(\"timestamp\") = '2018-02-11'\r\n and timestamp < '2018-02-11T16:32:53+00:00'\r\norder by\r\n search_index.timestamp desc, rowid\r\nlimit 41\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 705215230, "label": "Pagination"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/dogsheep-beta/issues/26#issuecomment-695875274", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-beta/issues/26", "id": 695875274, "node_id": "MDEyOklzc3VlQ29tbWVudDY5NTg3NTI3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-21T02:28:58Z", "updated_at": "2020-09-21T02:28:58Z", "author_association": "MEMBER", "body": "Datasette's implementation is complex because it has to support compound primary keys: https://github.com/simonw/datasette/blob/a258339a935d8d29a95940ef1db01e98bb85ae63/datasette/utils/__init__.py#L88-L114 - but that's not something that's needed for dogsheep-beta.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 705215230, "label": "Pagination"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/dogsheep-beta/issues/26#issuecomment-695856967", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-beta/issues/26", "id": 695856967, "node_id": "MDEyOklzc3VlQ29tbWVudDY5NTg1Njk2Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-21T00:26:59Z", "updated_at": "2020-09-21T00:26:59Z", "author_association": "MEMBER", "body": "It's a shame Datasette doesn't currently have an easy way to implement sorted-by-rank keyset-paginated using a TableView or QueryView. I'll have to do this using the custom SQL query constructed in the plugin: https://github.com/dogsheep/dogsheep-beta/blob/bed9df2b3ef68189e2e445427721a28f4e9b4887/dogsheep_beta/__init__.py#L8-L43", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 705215230, "label": "Pagination"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/dogsheep-beta/issues/26#issuecomment-695856398", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-beta/issues/26", "id": 695856398, "node_id": "MDEyOklzc3VlQ29tbWVudDY5NTg1NjM5OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-21T00:22:20Z", "updated_at": "2020-09-21T00:22:20Z", "author_association": "MEMBER", "body": "I'm going to try for keyset pagination sorted by relevance just as a learning exercise.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 705215230, "label": "Pagination"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/dogsheep-beta/issues/26#issuecomment-695855723", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-beta/issues/26", "id": 695855723, "node_id": "MDEyOklzc3VlQ29tbWVudDY5NTg1NTcyMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-21T00:16:52Z", "updated_at": "2020-09-21T00:17:53Z", "author_association": "MEMBER", "body": "It feels a bit weird to implement keyset pagination against results sorted by `rank` because the ranks could change substantially if the search index gets updated while the user is paginating.\r\n\r\nI may just ignore that though. If you want reliable pagination you can get it by sorting by date. Maybe it doesn't even make sense to offer pagination if you sort by relevance?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 705215230, "label": "Pagination"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/dogsheep-beta/issues/26#issuecomment-695855646", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-beta/issues/26", "id": 695855646, "node_id": "MDEyOklzc3VlQ29tbWVudDY5NTg1NTY0Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-09-21T00:16:11Z", "updated_at": "2020-09-21T00:16:11Z", "author_association": "MEMBER", "body": "Should I do this with offset/limit or should I do proper keyset pagination?\r\n\r\nI think keyset because then it will work well for the full search interface with no filters or search string.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 705215230, "label": "Pagination"}, "performed_via_github_app": null}