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

Selenium does not see alert window
When is runnable object garbage collected in ExecutorService?
java.util.concurrentModification Exception while Iteration over JSONObject
Drawing app questions about pen, saving images and invalid commands
Openshift DIY java
RemoteCache, RemoteCacheManager, and Lifecycle
Netbeans build fails with Glassfish “module has not been deployed”
better algorithm for collision detection in java processing 3 (2D)?
Does FetchType.LAZY fetch anything in list or it's empty
JSONObject Values into another JSONObject with Key Value Pair
Using Java Comparator for sorting using multiple fields based on condition
Casting(?) a known superclass object to an unknown subclass reference
Servlet works on my Tomcat server, but not my Glassfish4 server
How do I replace an ImageView with a Layout containing many elements in Android Studio? [closed]
Create Multiline Event Hibernate
convert java arraylist to array using for loop

Categories

HOME
multithreading
path-finding
angular-material
relay
sqlite-net-extensions
setup-deployment
spring-jdbc
tizen-web-app
gps
callback
podio
google-translate
facebook-php-sdk
spring-xd
modelica
postgres-xl
flask-wtforms
ml
facebook-instant-articles
jndi
dxf
rundeck
shopware
numerical-methods
fifo
xacml
facebook-apps
webkitspeechrecognition
react-chartjs
bcd
preg-match-all
twilio-api
suricata
lto
sqlite2
greenrobot-eventbus
dism
ws-security
particles.js
hp-ux
heightmap
atomicity
qsslsocket
celery-task
lowpass-filter
drupal-6
qtwebview
dwscript
android-textview
intrusion-detection
mikroc
django-debug-toolbar
paypal-express
lttng
holder.js
angstrom-linux
bluegiga
pagerank
freelancer.com-api
xna-4.0
cartesian-product
libressl
emailrelay
apache-commons-fileupload
fscommand
android-imagebutton
file-copying
client-side-templating
code-access-security
xojo
phpthumb
terminal-services
multiprocessor
mysqltuner
ivyde
quantlib-swig
dotnetnuke-5
smtp-auth
mhtml
funscript
word-processor
jspinclude
postgresql-performance
pendrive
cufon
libc++
zpt
tomcat-valve
javax.script
yetanotherforum
winbugs14
iphone-web-app
lang
.nettiers
modelstate
libs
swing-app-framework
noscript
putchar
dbisam

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