Time for action – indexing an example document with cURL
Now that we have defined our example document, let's index it! Steps for indexing an example document with cURL are as follows:
- The simplest way to send it for indexing is by using the cURL command-line tool:
>> curl -X POST 'http://localhost:8983/solr/simple/update?commit=true&wt=json' -H 'Content-Type: text/xml' -d @docs.xml
- If you have named the file to be posted in a different way, just use your own name in the command. I assume that you are executing cURL from the
/test/chp02 directory; if not, please use the full path name for your file.
- If everything goes well, you should receive output like the following:
- This result will inform us about ...