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

How to make a relative path to my file?
How to change tooltip text of a JavaFX stage default close (aka 'X') button?
What is the output of this code in Java?
table Expenses has no column named category [duplicate]
How the annotation #ApplicationPath from JAX-RS works side to side with a non-rest resource?
BDD Cucumber reporting issue in Jenkins
In debug mode I can see extra array list elements and are initialized to zero
JavaFx ComboBox valueProperty().addListener(new ChangeListener<String>() progressively repeated
Skip list remove and print method in java
How to start new line after press keyboard key is “ENTER” in SWT table cell?
ECIES encryption/decryption Java
For JSONArray parsing: TRY inside LOOP or LOOP inside TRY?
InstanceAlreadyExistsException coming from kafka consumer
Pong Game in java
Unable to Configure log4j2(v2.5) using dynamically changing configuration read from properties file
PostgreSQL function taking too long to complete execution

Categories

HOME
testing
deployment
ngrx
single-sign-on
fft
iot
relay
spagobi
ravendb
pivotal-cloud-foundry
enterprise-library-5
indesign
android-youtube-api
cloudkit
tomcat6
numeral.js
quicklook
postgres-xl
systemc
django-admin
saxon
scichart
immutable.js
chromium-embedded
icloud-api
xpages-ssjs
ecto
yadcf
scorm2004
android-nestedscrollview
stacked
vxworks
x11-forwarding
unoconv
ncalc
core-plot
eigenvalue
logfiles
font-size
pearson
jquery-filter
android-fonts
multi-level
mongocsharpdriver
lttng
bgp
php-parse-error
iad
thredds
wireshark-dissector
jqgrid-formatter
embedded-code
method-parameters
ami
mmc
remobjects
clicktag
c3
google-style-guide
qcodo
titanium-modules
article
reactfx
system.net.webexception
multiprocessor
sitemesh
excel-2003
limejs
specification-pattern
twrequest
parametric-equations
regsvr32
nsmanagedobject
fireworks
hirefire
genshi
horizontal-accordion
yui-datatable
winbugs14
xfbml
radcombobox
cxxtest
ext3
photoshop-cs4
wsdl.exe

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App