minvws / nl-kat-coordination

Repo nl-kat-coordination for minvws
European Union Public License 1.2
122 stars 55 forks source link

Implement fuzzy search for filtering tasks #716

Open Darwinkel opened 1 year ago

Darwinkel commented 1 year ago

Form a ux-standpoint I would suggest a fuzzy search. Helping our users find what they are looking for as much as possible. But being able to filter on full matches is better than not at all. So building this iteratively and upgrading the filters UX behaviour in a new pr is ok with me if this introduces technical difficulties or a lot of additional work.

I agree that having a more relaxed search would be best, however, the current api's do not have this feature available. Lets create new Issues for that on the backend. Currently, we do an equals on the object name. This should work the same for normalizers and boefjes however. A fuzzier search that we could implement is 'contains' next to 'equals', so that partial matches will return something. Beyond that we should just stick to whatever fuzzy text matching postgres allows us to do easily.

A good extra feature for this would be to deeplink from the objects page directly to this filtered task list, with the object already filled in.

Originally posted by @underdarknl in https://github.com/minvws/nl-kat-coordination/issues/572#issuecomment-1503344197

Subtasks

Darwinkel commented 1 year ago

Related: https://github.com/minvws/nl-kat-coordination/issues/198

Haikevt commented 1 year ago

The JS used is the one that was originally made for the Katalogus (Rocky/assests/js/autoSubmit.js). When you look at the detail page of a Boefje in the Katalogus, you can filter on an object name as well. To keep matters consistent, changing that seems logical. But then do we want to change it in the JS, or implement it in Python (meaning replacing the JS file)?

jpbruinsslot commented 7 months ago

Work has been done on the scheduler to support these kind of queries by extending the api with new filtering options (https://github.com/minvws/nl-kat-coordination/issues/1699)

underdarknl commented 1 month ago

as noted in https://github.com/minvws/nl-kat-coordination/pull/1749 We can now use the following fuzzy search comparators:

It would relatively easy to construct a smarter query param to use these instead of the 'eq' operator by default.