Open petecheslock opened 9 years ago
I suspect this is another instance of #92 - @petecheslock if you do "role:api_server AND chef_environment:#{node.chef_environment} OR NOT tags:hidden"
do you still get both nodes returned?
@thommay yea - same thing (using latest 12.12.15 version of chef), if I do the query: role:api_server AND chef_environment:#{node.chef_environment} OR NOT tags:hidden
then both nodes are still returned.
I just hit this bug too. In solr as far as I can tell the proper search query is: role:A AND chef_environment:B NOT tags:C
. That NOT behaves as an AND NOT. However, that NOT seems to behave as an OR NOT in chef-zero instead. I'm able to workaround the issue by replacing the NOT with AND NOT.
This is with both Chef
12.0.0
and12.1.1
When talking to a real chef server (in that case hosted chef) - and running the following queries. I get the following results (there are about 60 other nodes in this hosted chef account).
Works as I would expect
Also here i'm using filter results - but have confirmed the issue with both normal search and "partial" search.
On a test server - (using test-kichen with chef zero provisioner), and pre-populating node data, I see the following:
Node Data
Then running queries against:
So in this case it seems to be the
AND
orAND NOT
at the end. This is easy for us to work around by usingAND NOT
in our cookbooks since that seems to work for both, but there might be a chef-zero or localmode bug.