Search mode "doesntContain" - conditions linked by OR ?
robbykrlos opened this issue · 1 comments
This is a bug.
Prerequisites
- Are you running the latest version?
- Are you reporting to the correct repository?
- Did you check the documentation?
- Did you perform a cursory search?
Description
Hi,
I have this feeling that we already had a discussion over this issue, but cannot find it anywhere on any of the repos.
We've noticed that search mode "doesntContain"
is somehow pointless in 99% of the situations (we have).
Having a normal table with some information inside, our expectation are that "doesntContain" will search for all rows that do not contain the value given in ANY of it's columns.
Current implementation searches for rows that - at least ONE of the column values doesntContain
the search value. This will probably be 99.99% of the cases.
Technically, the query generated for the doesntContain
should not be:
WHERE
(("table"."status" NOT LIKE '123')
OR ("table"."name" NOT LIKE '123')
OR ("table"."type" NOT LIKE '123')
OR ("table"."ip" NOT LIKE '123')
OR ("table"."reason" NOT LIKE '123')
OR ("table"."protocol" NOT LIKE '123')
OR ("table"."port" NOT LIKE '123'))
but:
WHERE
(("table"."status" NOT LIKE '123')
AND ("table"."name" NOT LIKE '123')
AND ("table"."type" NOT LIKE '123')
AND ("table"."ip" NOT LIKE '123')
AND ("table"."reason" NOT LIKE '123')
AND ("table"."protocol" NOT LIKE '123')
AND ("table"."port" NOT LIKE '123'))
Maybe it's a matter of perspective and you wanted this implemented in this way, in which case we can close this "bug", But for us, the normal expectation is to avoid the searched string in all columns at once.
Thanks.
PS: not sure if relevant, but this was tested on PostgreSQL DB.
definitely a bug