It's a pure negative query trap of Boolean Retrieval. The worse thing is that it's handled in half of the cases, and goes along in others.
On Thu, Apr 17, 2025 at 9:05 PM Farmerie, Henry <henry.farme...@siemens.com.invalid> wrote: > I'm observing the following behavior with Solr 9.7.0: > > Searching for attributes that are empty (have no value), I'm using the > syntax "-attributename1:*". > This query works correctly and returns many results (because > attributename1 is empty for many documents): > > > http://hostname:8983/solr/solr1/select?q=-attributename1:*%20AND%20Class:Document&wt=xml&rows=10000 > > Whereas this query looking for either attributename1 OR attributename2 > being empty returns zero results: > > > http://hostname:8983/solr/solr1/select?q=-attributename1:*%20OR%20-attributename2:*%20AND%20Class:Document&wt=xml&rows=10000 > > enclosing the first 2 attributes in parentheses doesn't change the > behavior, still zero results. > > > http://hostname:8983/solr/solr1/select?q=(-attributename1:*%20OR%20-attributename2:*)%20AND%20Class:Document&wt=xml&rows=10000 > > Does anyone know why this is happening? It should be still returning the > results of attributename1 being empty. > > Henry Farmerie > > Siemens Product Lifecycle Management Software Inc. > Communications and Government Affairs > Lifecycle Coll > > Shoreview, MN 55126 United States > Fax :+1 (651) 855-6280 > henry.farme...@siemens.com <mailto:henry.farme...@siemens.com> > > -- Sincerely yours Mikhail Khludnev