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
Nested if statements vs complex logic in condition
Is there any way to change the monitor orientation in Java (OSX/Windows, NOT android)?
how to automate desktop application authorization process?
How to make a contact form that sends me mails in Spring + thymeleaf
IntelliJ IDEA won't step into method in third party jar
selenium installation hurdle “importfirefoxdriver”
MediaPlayer doesn't work, error (1, -2147483648), Prepare failed.: status=0x1
Serialize multiple entries to the same file
Filling a progressbar via a variable [closed]
Regular expression to return results that do not match selection
Having trouble with a one dimensional array
spring security custom login form
Which methods must be ideally overriden for a collection of custom object eg: Customer? [closed]
GPG encryption working from mac terminal but not from java Runtime.getRuntime().exec()
JavaFX - Extra horizontal space in drawing arrows after rotation
Thread safety of Vertx event loops whose handlers modify shared resource