Argus icon indicating copy to clipboard operation
Argus copied to clipboard

Idea: Ability to use logical OR and NOT in filters

Open vidarstokke opened this issue 4 years ago • 3 comments

Today, if you put multiple Tags and/or Sources in a filter, this will automatically become an AND filter, meaning all the sources and tags need to be in the incident. I need the possibility to do logical OR too.

I also need to be able to make filters with NOT, so that I can say that I want to see incidents that are NOT with a spesific Tag og Source.

vidarstokke avatar Mar 23 '21 07:03 vidarstokke

Assuming that there is backend support for such queries, do you have any preferences or suggestions as to how you should write these queries? I think it will be hard to write such queries using the current system for selecting tags and sources. Have you looked at Uninett/Argus#1443?

jorgenbele avatar Mar 23 '21 14:03 jorgenbele

Clarification: Adding multiple sources in the "source" filter is actually an OR combination. Nothing else would make sense. However, tag filters are ANDed together, and the set of sources and the set of tags are ANDed together.

I.e., today it goes something like (source[0] OR source[1] OR source[2] OR ...) AND tag1=foo AND tag2=bar AND tag3=bar AND ...

lunkwill42 avatar Aug 02 '21 11:08 lunkwill42

Tags are actually:

(tag1=foo OR tag1=bar) AND tag2=xux

hmpf avatar May 19 '25 07:05 hmpf