O'Reilly logo

Mastering Apache Solr 7.x by Dharmesh Vasoya, Chintan Mehta, Sandeep Nair

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with an index handler with the XML format

Now let's try to add some content to our index using the XML format. Open the Postman tool and add the URL http://localhost:8983/solr/gettingstarted/update, as shown in the following screenshot:

Note that we have selected the method type to POST. You also need to add a request header, Content-Type, to text/xml. Most of this can be done in Postman as we just select values from the dropdown, as shown previously.

Now switch to the Body tab and add the following content:

<add>    <doc>        <field name="title">Harry Potter and Prisoner of          Azkaban</field>        <field name="author">J.K. Rowling</field> </doc> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required