Is is possible to index (add/update) solr using jquery AJAX?
I am trying with jasonp first, but no luck.
try {
$.ajax({
type: "POST",
url:
"http://192.168.10.113:8080/solr/update/json?commit=true",
data: { "add": { "doc": { "id": "222222", "name": "Ruby on
Trails"}} },
contentType: "application/json",
dataType: 'jsonp',
crossDomain: true,
jsonp: 'json.wrf',
success: function (data) { alert(data); },
failure: function (errMsg) {
alert(errMsg);
}
});
}
catch (err) {
alert(err);
}
Xml update is not working because the solr server is a different domain. I
have tried to use CORS filter on tomcat but that's also not working.
http://software.dzhuvinov.com/cors-filter-installation.html
Please suggest.
--
View this message in context:
http://lucene.472066.n3.nabble.com/index-solr-using-jquery-AJAX-tp4017490.html
Sent from the Solr - User mailing list archive at Nabble.com.