On 30 October 2012 20:16, Amit Mallik <amit.mal...@gmail.com> wrote:
> 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";<http://myserver:8080/solr/update?commit=true>,
>
>                 data: "<add><doc><field name=id>299990</field><field
> name=name>trailblazers</field></doc></add>",
[...]

Am away from where I can check this, but your  Solr XMl seems ill-formed.
Please take a look at example/exampledocs/mem.xml in a Solr source
directory for an example. The "name" attribute for each field needs to be
quoted, and here the quotes would need to be escaped. Please see
http://stackoverflow.com/questions/3099369/jquery-ajax-post-to-web-service
for an example of a proper XML post from jQuery.ajax

Regards,
Gora

Reply via email to