Index handler with JSON

Solr also supports JSON-formatted documents to be indexed. Let's look at a simple example of indexing just one document. To add documents in JSON format on our gettingstarted collection, we need to use the following URLhttp://localhost:8983/solr/gettingstarted/update/json/docs.

Open Postman and create a new request with this URL. See the following screenshot for clarity:

As you can see, we have set Content-Type to application/json. Now click on the Body tab and put the JSON content as follows:

Once you are done, execute ...

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.