bug: empty IN () clause crashes search when from_ids is empty list
## Summary `_execute_query` generates invalid SQL `WHERE d.identifier IN ()` when `from_ids` is an empty list (`[]`), causing a `ParserException` from DuckDB. ## Reproduction Any search query triggers the crash: `GET /en/search?q=housing` → 500. ## Root cause In `store.py:2018-2021`: ```python if from_ids is not None: placeholders = ", ".join("?" * len(from_ids)) wheres.append(f"d.identifier IN ({placeholders})") params.extend(from_ids) ``` When `from_ids` is `[]` (empty but not `None`), `placeholders` becomes `""` producing `IN ()` — invalid DuckDB SQL. The same pattern appears at lines 2020, 2141, 2300, 2356, 2405. ## DuckDB error ``` _duckdb.ParserException: Parser Error: syntax error at or near ")" LINE 1: SELECT COUNT(*) FROM dataset d WHERE d.identifier IN () ``` ## Suggested fix Guard with `if from_ids is not None and from_ids:` or short-circuit to an empty result when the list is empty.
issue