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

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

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