search_cop icon indicating copy to clipboard operation
search_cop copied to clipboard

Searching for empty or non empty with the free text expression

Open DannyBen opened this issue 3 years ago • 2 comments

I was going through the README to see if I missed it, but could not find anything related.

Is there a way / operator to search for empty or non empty values?

What I have in mind is like GitHub and Gmail search. For example, to search for users with non-empty email, one of these would be nice to have:

  • has:email
  • email:*
  • email:empty (and email:any as the opposite)

Is this possible? If not, is there any other way to search for empty/non empty attributes?

While on that note, it would also be nice to have the below syntax for booleans (like GitHub).

  • is:active # same as active:yes
  • is:issue

DannyBen avatar Jun 14 '20 13:06 DannyBen

You can search for empty strings via email="" and NOT email="". You are however not able search for NULL values.

Regarding your examples, i'd favor exists:[field].

mrkamel avatar Jun 14 '20 15:06 mrkamel

Thank you. This is not ideal, but its definitely better than not having any of it.

I wish these expressions to be human readable and to clearly state intent.

NOT email="" is far less appealing than has:email, and if it is not handling nil the same, this is pretty much off the table for me.

Judging by both Gmail and GitHub - two of my favorite giants - they both use is:issue and has:attachment for things like that, and not exists - which is more of a developer lingo rather than a user lingo.

DannyBen avatar Jun 14 '20 16:06 DannyBen