INL / corpus-frontend

BlackLab Frontend, a feature-rich corpus search interface for BlackLab.
16 stars 7 forks source link

Remove grouping on label if label no longer present in new query #496

Closed KCMertens closed 4 months ago

KCMertens commented 5 months ago

Currently this results in an error from BlackLab, but it's hard to detect this situation before it occurs. Repro:

  1. Search for a query with a capture group, e.g. a:[] "a.*"
  2. Group by the capture group a
  3. Remove or rename the capture group e.g. `[] "a.*"

We're now still grouping on the capture group, but it no longer exists, BlackLab returns an error.

Maybe after Jan's work of integrating the BlackLab query parser into the frontend, we can detect whether the new query still has the labels and remove the grouping if not. Will have to see.

There's an easy workaround though, just remove the group before running the new query.