jquery - How to know whether solr server is running or not -
i've got problem can't solve. partly because can't explain right terms. i'm new sorry clumsy question.
below can see overview of goal.
i'm using magento ce 1.7.0.2 & solr 4.6.0.
var url1 ="http://127.0.0.1:8080/solr/select?q=iphon&wt=json&json.wrf=?"; $.getjson(url1,function(result){ // logic });
when solr server running means script working fine.but if solr server not running means it'll not work.
but goal write script this...
if( solr server running){ var url1 ="http://127.0.0.1:8080/solr/select?q=iphon&wt=json&json.wrf=?"; $.getjson(url1,function(result){ // logic-1 }); }else{ // logic-2 }
so how know whether solr server running or not ?
& know duplicate question never find solution please ignore it.
any ideas ?
don't know how solr works, proper jquery be:
$.ajax({ type: "get", url: "http://127.0.0.1:8080/solr/select?q=iphon&wt=json&json.wrf=?", datatype: "json", success: function (result) { // working }, error: function (result) { // not } });
Comments
Post a Comment