Knife search command issue on latest chef workstation 26.0.18

if you use knife search include condition "TO", "AND", "OR", "NOT" it will show bleow errors
ERROR: Chef::Exceptions::InvalidSearchQuery: Invalid search object type nil (NilClass), must be a String or Symbol.Usage: search(:node, QUERY[, OPTIONAL_ARGS]) knife search environment QUERY (options)
for example
knife search node "chef_packages_chef_version:[* TO 19]" -i
knife search node "policy_group:test AND policy_name:policy_name" -i

Thanks, Steven, for reporting. We will work on the fix and we will let you know once release is out.

1 Like