phillro/node-elasticsearch-client

Search Documentation

Opened this issue · 1 comments

The documentation for the search function leads one to believe that

var qryObj = {
field1 : "term"
};

will search for documents that have the value "term" in the field "field1"
However, this is untrue, it should be

var qryObj = {
    "query" : {
        "term" : { "field1" : "term" }
    }
};

Please update the documentation so that others don't run into simliar problems as myself.

Also, better/more documentation in general would be great.

Thanks
-Epicblood

awesome suggestions