Unindexed attributes search issue on Chef 10.18

Hey Guys,

I’ve got a really weird chef Search issue on an old 10.18 server (Ubuntu
10.04.4) I can’t quite figure out and wondered if anyone had run into this
(I’ve tried running a “knife index rebuild” with no change to the results
below).

I’ve got a few nodes that have their environment set but don’t show up if I
use the chef_environment attribute in the search.

For example, I know they’re being indexed because if I run:

knife search node “recipes:test* AND facility:example”

The nodes in question are included:

Node Name: apps-2.example.test.com
Environment: production
FQDN: apps-2.example.test.com
IP: 1.2.3.4
Run List: role[example-base], role[combined-example]

Node Name: apps-1.example.test.com
Environment: production
FQDN: apps-1.example.test.com
IP: 1.2.3.5
Run List: role[example-base], role[combined-example]

But if I change that to:

knife search node “chef_environment:production AND facility:example”

The apps-1 and apps-2 are nowhere to be found in the results (and as you
can see from the first search their environment is set). apps-1 and apps-2
are also missing if I do:

knife search node “chef_environment:* AND facility:example”

Has anyone ever seen anything like this before? We are in the slow process
of converting to Chef 12 but its a long process and we need to be able to
keep the Chef 10 environment operating optimally until its ready.

-J