java
inserting json into solr 5.5
The following is my code: HttpPost postRequest = new HttpPost("http://localhost:8983/solr/core1/update/json?wt=json&commit=true"); StringEntity entity = new StringEntity("{\n" + " \"id\": \"1\",\n" + " \"title\": \"Doc 1\"\n" + "}", "UTF-8"); entity.setContentType("application/json"); postRequest.setEntity(entity); HttpResponse response = httpClient.execute(postRequest); when i am trying to add json to solr 5.5.0 , i got the below exception: {"responseHeader":{"status":400,"QTime":2},"error":{"metadata":["error-class","org.apache.solr.common.SolrException","root-error-class","org.apache.solr.common.SolrException"],"msg":"Unknown command 'id' at [9]","code":400}} Can anyone please help me???
Related Links
SQlite error when connecting to database
Store Custom Arraylist in SharedPreferences and get it from there?
Retrieve count of method parameters and name of parameters in java
How to get specific substring with option vale using java
Error while extracting REST response in Mule
Java reading txt file from user input and outputting data according to user input
how to create test class and folder from android studio?
JavaParser doesn't update source file
Print a part of string that made a string match regex
Issue with new lines in a JTextArea
ListView Items' background get mixed up when scrolling listView
Weka OneClass Classifier Prediction Error using Java
Android random IOExceptions with CipherInputStream and ObjectInputStream
Replacing and converting strings
Is it possible to define an optional flow or exception-like behaviour in Java 8 streams API?
Trouble printing out pattern in array