No Transport error while calling from Jquery

Hi All,

I am trying to call the search from Jquery and I am getting a "NO Transport
Error" for the request.

function search(){
var data = {
query: {
query_string: {
query: 'Selmath'
}
},
fields: 'customername'
};
$.ajax({
url: 'http://localhost:9200/_search',
type: 'POST',
dataType: 'json',
success: function(data) {
alert('Total results found: ' + data.hits.total);
},
error: function (data, textStatus,error) {
alert("error"+error);
}
});
}

Please help me.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/fb64c43e-ddbb-494e-8f91-d21c12682f63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.