Ignoring a release when a specific field has any value

Tags: #<Tag:0x00007fe3d3b3b5c8> #<Tag:0x00007fe3d3b3b488> #<Tag:0x00007fe3d3b3b348>


In my search query, I’d like to filter out anything that has a secondary type. I tried using the following:

AND secondarytype:\-

  • If a release doesn’t have a secondary type, the field is not displayed, so I get zero results.
    NOT secondarytype:*
  • I think this errors out because it’s an unexpected character.
    NOT secondarytype:\*
  • This actually looks for an asterisk. Which of course doesn’t work.
    NOT secondarytype:%2a
  • My results come through and I don’t get errors, but it doesn’t filter out the releases with a secondarytype like expected.

Is there a way to do this that I’m missing? I’ve read through the Lucene queryparser docs a few times and I just can’t seem to get the results I’m looking for.


Alright. I finally figured it out with some regex:

NOT secondarytype:/.*/

Sorry for answering my own question, I thought I had tried everything already. :slight_smile: