Skip to content

Instantly share code, notes, and snippets.

@vthacker
Last active May 4, 2017 11:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save vthacker/420b93d0fc9b8a30c2e9 to your computer and use it in GitHub Desktop.
Save vthacker/420b93d0fc9b8a30c2e9 to your computer and use it in GitHub Desktop.
JSON formats
curl http://localhost:8983/solr/update -H 'Content-type:application/json' -d '
[
{
"id": "1",
"title": "Doc 1"
},
{
"id": "2",
"title": "Doc 2"
}
]'
curl http://localhost:8983/solr/update -H 'Content-type:application/json' -d '
{
"add": [
{
"id": "1",
"title": "Doc 1"
},
{
"id": "2",
"title": "Doc 2"
}
]
}'
curl http://localhost:8983/solr/update -H 'Content-type:application/json' -d '
{
"add": {
"doc": {
"id": "1",
"title":"Doc 1"
}
},
"add": {
"doc": {
"id": "2",
"title":"Doc 2"
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment