searchINDEX not working
gottaloveit opened this issue · 0 comments
gottaloveit commented
Could not get search to work using Chef style search query. Example code:
var ChefApi = require("chef-api");
var chef = new ChefApi();
var fs = require('fs');
fs.readFile('/etc/chef/client.pem', function (err, key) {
var options = {
client_name: "client",
key: key,
url: "http://chef.myserver.com:4000"
}
chef.config(options);
var body = "chef_environment:_default AND role:combined_cluster_web";
chef.getSearchIndex('node',body,function(err, res){
if(err)
throw err;
console.log(res);
});
});