{"html_url": "https://github.com/simonw/datasette/issues/1552#issuecomment-996084899", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1552", "id": 996084899, "node_id": "IC_kwDOBm6k_c47Xwyj", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T18:48:14Z", "updated_at": "2021-12-16T18:48:14Z", "author_association": "OWNER", "body": "Updated documentation: https://github.com/simonw/datasette/blob/20a2ed6bec367d2f6759be4a879364a72780b59d/docs/facets.rst#facets-in-metadatajson", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1078702875, "label": "Allow to set `facets_array` in metadata (like current `facets`)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1552#issuecomment-996077053", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1552", "id": 996077053, "node_id": "IC_kwDOBm6k_c47Xu39", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T18:36:41Z", "updated_at": "2021-12-16T18:36:41Z", "author_association": "OWNER", "body": "... actually no, I WILL document this, because not documenting this is what got us to this point in the first place!", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 1, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1078702875, "label": "Allow to set `facets_array` in metadata (like current `facets`)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1552#issuecomment-996076373", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1552", "id": 996076373, "node_id": "IC_kwDOBm6k_c47XutV", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T18:35:40Z", "updated_at": "2021-12-16T18:35:40Z", "author_association": "OWNER", "body": "I'm going to ship your fix now, but I'm not going to add this to the documentation yet because I hope to improve the design prior to Datasette 1.0.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1078702875, "label": "Allow to set `facets_array` in metadata (like current `facets`)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1552#issuecomment-996046304", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1552", "id": 996046304, "node_id": "IC_kwDOBm6k_c47XnXg", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T17:53:40Z", "updated_at": "2021-12-16T18:16:12Z", "author_association": "OWNER", "body": "I'm also not convinced that this configuration syntax is right. It's a bit weird having a `\"facets\"` list that can either by column-name-strings or `{\"type-of-facet\": \"column-name\"}` objects. Maybe there's a better design for this?\r\n\r\nPart of the problem here is that facets were designed to accept optional extra configuration - partly to support `m2m` facets in #495 - but I haven't actually shipped any facets that use that ability.\r\n\r\nFacet by delimiter would be a good one to exercise that ability:\r\n- #510", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1078702875, "label": "Allow to set `facets_array` in metadata (like current `facets`)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1552#issuecomment-996045776", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1552", "id": 996045776, "node_id": "IC_kwDOBm6k_c47XnPQ", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T17:52:54Z", "updated_at": "2021-12-16T17:52:54Z", "author_association": "OWNER", "body": "I tried that fix you suggested and now this `metadata.json` does the right thing:\r\n```json\r\n{\r\n \"databases\": {\r\n \"fixtures\": {\r\n \"tables\": {\r\n \"facetable\": {\r\n \"facets\": [\r\n {\r\n \"array\": \"tags\"\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n }\r\n}\r\n```\r\nIt does further highlight the bug in #625 though - since then if you try to add `?_facet=tags` to facet by tags treating them NOT as an array your request to do so is ignored.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1078702875, "label": "Allow to set `facets_array` in metadata (like current `facets`)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1552#issuecomment-996034408", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1552", "id": 996034408, "node_id": "IC_kwDOBm6k_c47Xkdo", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-16T17:37:37Z", "updated_at": "2021-12-16T17:37:37Z", "author_association": "OWNER", "body": "I think you're right! I had completely forgotten that piece of code.\r\n\r\nThis just turned into a bug fix and a documentation update. Thanks for the research!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1078702875, "label": "Allow to set `facets_array` in metadata (like current `facets`)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1552#issuecomment-995034143", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1552", "id": 995034143, "node_id": "IC_kwDOBm6k_c47TwQf", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-12-15T18:02:53Z", "updated_at": "2021-12-15T18:02:53Z", "author_association": "OWNER", "body": "This is definitely a missing feature. The \"different types of facet\" stuff feels incomplete to me generally - this is one issue, but this one as well:\r\n\r\n- #625", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1078702875, "label": "Allow to set `facets_array` in metadata (like current `facets`)"}, "performed_via_github_app": null}