Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8745265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:58:44+00:00 2026-06-13T11:58:44+00:00

I am trying to add new document in the solr server using ajax. To

  • 0

I am trying to add new document in the solr server using ajax.

To add a new document in the solr server we have to write
http:// 192.168.10.113:8080/solr/update/?commit=true%20-H%20%22Content-Type:%20text/xml%22%20–data-binary%20%20%3Cadd%3E%3Cdoc%3E%3Cfield%20name=’id’%3E19990%3C/field%3E%3C/doc%3E%3C/add%3E

actual Code:
< add>< doc> < field name=’id>19990>< /field> < /doc> < /add>

Now i tried to add the document in the server .

My AJAX Code:

$.ajax({
            url: "http://192.168.10.113:8080/solr/update/?commit=true%20-H%20%22Content-Type:%20text/xml%22%20--data-binary%20'<add><response><doc><field%20name='id'>19990</field></doc></response></add>'",
            type: 'POST',
            success: function (data) {
                    alert(data);
            }
        });

ajax call didn’t show any error.

then i try to fetch the data
like this:
http:// 192.168.10.113:8080/solr/select/?q=19990&version=2.2&start=0&rows=10&indent=on

it is not showing that data.

Please help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:58:45+00:00Added an answer on June 13, 2026 at 11:58 am
    1. It might take sometime till the solr repository get updated. look on your commit strategy and maybe try to commit on your own.

    2. How did you tried to add it? using curl? or using some browser? cause the request might be an update or a post request…

    3. use this: https://github.com/evolvingweb/ajax-solr

    4. the “–data-binary” is a curl flag and not should be in the url, you should put your xml data in the ajax request’s data and not in the url:

     $.ajax({
            type     : "POST",
            url      : "http://192.168.10.113:8080/solr/update/?commit=true",
            data     : { xml: escape("<add><response><doc><field name=id>19990</field></doc></response></add>") },
            dataType : "text/xml",
            success  : function(msg){
                alert('Success ');
            },
            error    : function(msg) {
                alert('Failed');
            }
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Issue context: Have a piece of code that's trying to add a new document
I am trying to add document to the index using c# (xml) but I
I have been trying to add onclick event to new elements I added with
I have created a index as Document doc = new Document(); doc.Add(new Field(SearchKey, (item.FullTextColumn
I have below updateFile code, here I am trying to add new node when
I am using this code trying to add new content before another element: var
Im trying to simply create a new document using the Zend Google Docs API's
I'm trying to add a table to a document using iTextSharp. Here is an
I'm trying to add a new node to an existing XML document. However, trying
Im new to asp.net mvc. I'm trying add new model class but it got

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.