# No Transport error while calling from Jquery

**URL:** <https://discuss.elastic.co/t/no-transport-error-while-calling-from-jquery/22085>\
**Category:** Elasticsearch\
**Created:** [February 11, 2015, 5:43am UTC](https://discuss.elastic.co/t/no-transport-error-while-calling-from-jquery/22085 "2015-02-11T05:43:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Selmath\_Usman](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@Selmath\_Usman](https://discuss.elastic.co/u/Selmath_Usman)\
**Post date:** [February 11, 2015, 5:43am UTC](https://discuss.elastic.co/t/no-transport-error-while-calling-from-jquery/22085/1 "2015-02-11T05:43:45Z")

</div>

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](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](mailto: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](https://groups.google.com/d/msgid/elasticsearch/fb64c43e-ddbb-494e-8f91-d21c12682f63%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:33am UTC](https://discuss.elastic.co/t/no-transport-error-while-calling-from-jquery/22085/2 "2017-07-06T00:33:42Z")

</div>

Closed on July 6, 2017, 12:33am UTC


