Ignoring a release when a specific field has any value

Tags: #<Tag:0x00007f050c06c8f0> #<Tag:0x00007f050c07ff90> #<Tag:0x00007f050c07e9d8>


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: