-
-
Notifications
You must be signed in to change notification settings - Fork 813
Description
The new Facets implementation from #255 includes several hard-coded settings which should be made configurable somehow:
Number of rows to return in a facet (maybe this should also be an option that can be set via quersytring argument, e.g. ?_facet=qSpecies:40):
datasette/datasette/views/table.py
Line 539 in 9959a9e
| FACET_SIZE = 20 |
Time limit for executing a facet:
datasette/datasette/views/table.py
Lines 559 to 562 in 9959a9e
| facet_rows = await self.execute( | |
| name, facet_sql, params, | |
| truncate=False, custom_time_limit=200 | |
| ) |
Maximum unique values returned in order for a column to be suggested as a facet:
datasette/datasette/views/table.py
Lines 646 to 647 in 9959a9e
| # Detect suggested facets | |
| FACET_LIMIT = 30 |
Time limit for calculating if a column should be a suggested facet:
datasette/datasette/views/table.py
Lines 664 to 667 in 9959a9e
| distinct_values = await self.execute( | |
| name, suggested_facet_sql, params, | |
| truncate=False, custom_time_limit=50 | |
| ) |