December 2015
Intermediate to advanced
160 pages
2h 50m
English
In the previous section, we saw how we can add, update, and delete documents using XML. In this section, we'll see how we can perform the same operations using JSON data types.
We can send the JSON-formatted update request using Solr's update handler, by setting Content-type: application/json or text/json. There are three basic types of JSON documents that can be sent to Solr. They are:
We can add a single JSON document to Solr by posting the data to the /update/json/docs handler path. The following is an example of indexing JSON data in Solr:
$ curl 'http://localhost:8983/solr/musicCatalog/update/json/docs' ...
Read now
Unlock full access