We're now going to add some sample data to our Solr instance.
The exampledocs folder contains some XML files we can use.
A quick glance at one of the XML files reveals that each Solr document consists of multiple fields. Each field has a name and a value. For example:
Â name="name">Canon PowerShot SD500>
Â name="manu">Canon Inc.>
The post.sh shell script in the same folder provides a convenient way to add files to Solr via HTTP POST.
Posting file monitor.xml to http://localhost:8983/solr/update
<?xml version="1.0" encoding="UTF-8"?>
<lst name="responseHeader"><int name="status">0int><int name="QTime">89int>lst>
This response tells us that the POST operation was successful.
Note that there are 2 main ways of adding data to Solr: