Using the "%" (percent) wildcard with the like operator in name queries
- Dominant language
- Elm
- Stars
- 2.3k
- Forks
- 184
- Avg merge
- 8h 2m
- Merged PRs (30d)
- 4
Description
Hi,
I've just started using docspell, and noticed that the "%" can be used as wildcard instead of the "*" asterisk.
I think that's because the percent sign is used as wildcard in SQL LIKE queries (e.g. [mariadb](https://mariadb.com/kb/en/like/), [postgres](https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-LIKE) ) and isn't escaped by docspell.
The "%" is more powerful than the asterisk, as it also can be used in between ("t%t" matches "test").
The "_" (underscore), which can be used to match any single character, also works.
(Tested only on PostgreSQL for the name and source fields).
I think both are more a feature than a bug and should be documented.
And the asterisk, as it can be replaced by "%", should be removed (or deprecated)
Contributor guide
Assessment
This issue has not been assessed yet.