I want to insert data int solr through my application, I am using elasticsearch to store data to insert data in to elastic search I am usong following request :
"POST http://192.168.0.164:9200/_bulk HTTP/1.1
Host: 192.168.0.164:9200
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;)
Pragma: no-cache
Content-Type: application/x-www-form-urlencoded
Content-Length: 307"
"{"index":{"_index": "16-03-2016-sslindex","_type":"session"}}
{"UniqueID":"2016-3-16-10-45-19-1-1","Time":"2016-3-16T10:45:19","SrcIp":"192.168.0.180","SrcPort":1123,"DstIp":"74.125.68.113","DstPort":443,"InterfaceID":"1","LocationID":2,"Size":0,"Snortname":"p_snort.log.123","Dummy1":"","Dummy2":0}"
I want to use solr in same ways. what should be the request structure so as to insert valye in to solr.
What I have tried:
I had tried the request POST http://192.168.0.164:8983/solr/collection1/update?wt=json HTTP/1.1
Host: 192.168.0.164:8983
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101 Firefox/45.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/json
X-Requested-With: XMLHttpRequest
Referer: http://192.168.0.164:8983/solr/
Content-Length: 106
Connection: keep-alive
"{"add":{ "doc":{"id":"change.me","from":"change.me"},"boost":1.0,"overwrite":false,"commitWithin":1000}}"
but it is not working