sorted search with id query
Closed this issue · 1 comments
cpentra1 commented
Hey,
Want to start by saying thanks for all the work and sharing.
Pretty new to elasticsearch, however tested the below code on command line and it worked. Node module doesn't seem to work. Would much appreciate any thoughts or suggestions.
Node API Call:
esClient.search( index, type, queryObj, function (err, data) {
...
}
with queryObj:
{
"query" : { "ids" : { "values" : [221,231,251,271,401] } },
"sort" : [ { "date" : { "order" : "desc" } } ],
"from" : 0,
"size" : 10
}
The query object works fine if I use command line:
curl -XGET 'http://localhost:9200///_search?' -d 'query object from above'
Thanks in advance for any help or suggestions,
Craig
cpentra1 commented
Ahhhh! it was something silly.. sorry for spam.