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/datasette/issues/359#issuecomment-481939013 | https://api.github.com/repos/simonw/datasette/issues/359 | 481939013 | MDEyOklzc3VlQ29tbWVudDQ4MTkzOTAxMw== | 9599 | 2019-04-11T02:17:55Z | 2019-04-11T02:17:55Z | OWNER | Challenge: facets can also be defined in `metadata.json` like this: ``` { "databases": { "sf-trees": { "tables": { "Street_Tree_List": { "facets": ["qLegalStatus"] } } } } } ``` But... `?_facet_array=definitions` doesn't fit in that data structure. Need to have an alternative mechanism for defining this kind of facet. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 349827640 | |
https://github.com/simonw/datasette/issues/427#issuecomment-481940539 | https://api.github.com/repos/simonw/datasette/issues/427 | 481940539 | MDEyOklzc3VlQ29tbWVudDQ4MTk0MDUzOQ== | 9599 | 2019-04-11T02:26:43Z | 2019-04-11T02:26:43Z | OWNER | I quite like the Solr idea. It could look like this for Datasette: `?_facet=name` - default behaviour, same as today. But that's actually an alias for `?_facet.name=name` - which defines a name for the facet. `?_facet.tags.array=tags` - would define a facet called `tags` that uses an array facet against the `tags` column. I don't like the need to say `tags` twice in that though. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 431800286 | |
https://github.com/simonw/datasette/issues/427#issuecomment-481957014 | https://api.github.com/repos/simonw/datasette/issues/427 | 481957014 | MDEyOklzc3VlQ29tbWVudDQ4MTk1NzAxNA== | 9599 | 2019-04-11T04:05:07Z | 2019-04-11T04:05:07Z | OWNER | OK, I have a plan: `?_facet=foo` `?_facet_facettype=options` Options here can be one of the following: - A single value which is the name of a table - A comma separated list of options - A JSON object starting with `{` or `[` If the table name itself contains a `,`, `{` or `]` then you have to escape it by putting it in a JSON object, `?_facet_percentile={"column":"{this_is,a_weird[column_name"}` for example. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 431800286 | |
https://github.com/simonw/datasette/issues/427#issuecomment-481957313 | https://api.github.com/repos/simonw/datasette/issues/427 | 481957313 | MDEyOklzc3VlQ29tbWVudDQ4MTk1NzMxMw== | 9599 | 2019-04-11T04:07:00Z | 2019-04-11T04:07:40Z | OWNER | This means the `metadata.json` format can look like this: ``` { "databases": { "sf-trees": { "tables": { "Street_Tree_List": { "facets": ["qLegalStatus", {"array": "tags"}, {"percentile": {"blah": "options"}}] } } } } } ``` So any advanced facets are represented here as a dictionary with a single key - the type - that maps to the options. | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 431800286 |