When i tried to create query like on nodejs like
var my_query = new Object("[{ "match": { "techskills.programming":"+ programming+" } }]");
var deferred = Q.defer();
client.search({
"index": _index,
"type": _type,
"body": {
"query": {
"bool": {
"must": my_query
}
}
}
},function (error,resp) {
console.log("Found error is ::::: "+error + " resp::: "+JSON.stringify(resp));
if(error) deferred.reject(error);
deferred.resolve(resp);
});
return deferred.promise;
}
I am getting [query_parsing_exception] [bool] query does not support [must] error.
How can i create dynamic query in elasticsearch so that i can append more criteria in query on runtime.