Skip to content

Instantly share code, notes, and snippets.

@lianyi
Created June 12, 2017 19:02
Show Gist options
  • Save lianyi/25097619e7b52494330582e0da1c27a2 to your computer and use it in GitHub Desktop.
Save lianyi/25097619e7b52494330582e0da1c27a2 to your computer and use it in GitHub Desktop.
solr testing Transfer-Encoding: chunked
export SOLRUPDATE='http://localhost:8983/solr/testingCore/update?wt=json&commit=true'
export SOLRQUERY='http://localhost:8983/solr/testingCore/select?wt=json&q=*:*'
curl $SOLRUPDATE --data-binary '[{"id": "1"},{"id": "2"}]' -H 'Content-Type: application/json' -X POST -H "Transfer-Encoding: chunked"
#>> response {"responseHeader":{"status":0,"QTime":295}}
curl $SOLRQUERY
#>> {"responseHeader":{"status":0,"QTime":15,"params":{"q":"*:*","wt":"json"}},"response":{"numFound":2,"start":0,"maxScore":1.0,"docs":[{"id":"1","_version_":1570026155898044416},{"id":"2","_version_":1570026155878121472}]}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment