Hi I am trying to index using AJAX basically jquery.
Below is my code
try {
$.ajax({
type: "POST",
url: "http://myserver:8080/solr/update?commit=true",
data: "<add><doc><field name=id>299990</field><field
name=name>trailblazers</field></doc></add>",
contentType: "text/xml",
success: function (data) { alert(data); },
failure: function (errMsg) {
alert(errMsg);
}
});
}
I see the request in server as 400. Not sure what is wrong.
192.168.11.88 - - [30/Oct/2012:19:31:54 +0530] "OPTIONS
/solr/update?commit=true HTTP/1.1" 400 1052
My question is
1. Is it possible to index solr using jquery, ajax.
2. If so what's wrong in the above format.