• Create Core
    $ ./bin/solr create -c <core-name>
    
  • Delete Core
    $ ./bin/solr delete -c <core-name>
    
  • Add Core
    $ curl "http://localhost:8983/solr/admin/cores?action=CREATE \
            &name=core-name \
            &instanceDir=/.solr/<core-name> \
            &config=solrconfig.xml&schema=schema.xml \
            &dataDir=/.solr/core-name/data"
    
  • Delete items by query
    $ curl "http://localhost:8983/solr/core-name/update? \
            stream.body=<delete><query>id:298253</query></delete> \
            &commit=true"
    
  • Delete items that matches more than one field
    $ curl "http://localhost:8983/solr/core-name/update? \
        stream.body=<delete><query>id:298253</query><query>entitytype:BlogEntry</query></delete> \
        &commit=true"
    
  • Delete all items
    $ curl http://localhost:8983/solr/core-name/update \
     -H "Content-Type: text/xml" \
     --data-binary '<delete><query>*:*</query></delete>'