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> ...

Get Mastering Apache Solr 7.x now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.