Steps for creating a search index using the cURL utility.
Create a search index using the cURL utility. On the operating system command line in
the solr_tutorial46 directory, post the configuration and schema, and create a Solr
core.
Procedure
-
On the operating system command line in the solr_tutorial46 directory, post the
configuration file.
$ curl http://localhost:8983/solr/resource/mykeyspace.hits/solrconfig.xml --data-binary @solrconfig.xml -H 'Content-type:text/xml; charset=utf-8'
The SUCCESS message appears.
-
Post the schema file.
$ curl http://localhost:8983/solr/resource/mykeyspace.hits/schema.xml --data-binary @schema.xml -H 'Content-type:text/xml; charset=utf-8'
The SUCCESS message appears.
-
Create the Solr core for the mykeyspace.hits table.
$ curl "http://localhost:8983/solr/admin/cores?action=CREATE&name=mykeyspace.hits"
Several codes are returned, one of which is 0, indicating
success.