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

Using Apache POI to write in xlsx file, Getting expected answer in the last column of the file
Value true at action of type java.lang.String cannot be converted to JSONArray
TomEE maven not getting updated class files
Java's ExecutorService.awaitTermination vs Future.get(<TimeOut>)
Java/HtmlUnit - How to get an HtmlImage from an HtmlImageInput?
Making java call to determine Apache Camel conditional routing
Spring batch define FlatFileItemReader in class reader that implements ItemReader not in bean java conf
Using JavaRDD.flatmap() iterator in Apache Spark 2
Java GUI Table adding certain rows to a watch-list
Complex string split method in java
Using Recursion to determine if input is prime
TensorFlow: initializing state for RNN between inferences in Android
How to store the full HTML table in JTable after parsing with JSoup?
What is a test script?
java regex matching &[text(text - text text) !text]
Container Managed EntityManager is Null on REST Application

Categories

HOME
atom-editor
magnific-popup
mfc
plone
smarty
iterator
lodash
electron
kalman-filter
sqlite-net-extensions
microservices
serverspec
datastax-java-driver
swagger-ui
cross-validation
facebook-messenger-bot
reveal.js
dtrace
iolanguage
django-simple-history
foselasticabundle
lucene.net
scriptcs
web-sql
mustache.php
language-agnostic
tibco-mdm
java-7
smb
internet-explorer-9
tooltipster
greendao
elasticsearch-ruby
skia
vsts-build-task
phpfreechat
nssegmentedcontrol
qwerty
xcode-extension
space-complexity
hot-module-replacement
mixture-model
ssjs
graphenedb
g-code
flashair
businessworks
long-polling
network-flow
gnome-shell-extensions
nested-sets
abcpdf9
measures
xml-attribute
gstreamer-0.10
whois
browser-link
uid
natvis
vhd
srand
wso2cloud
msys
intel-fortran
qdialog
mutation-observers
simple-framework
spidermonkey
relocation
qcodo
markers
zend-route
heisenbug
kgdb
mbr
floating-point-precision
page-layout
xsockets.net
commoncrypto
ora-00911
cos
pushbackinputstream
sqlperformance
sharp-repository
smtp-auth
clipper
bitsharp
coderush
first-responder
dsn
cascalog
php-parser
rfc1123
self-extracting
celltable
remember-me
gamequery
nhibernate.search
substrings
ugc
misv

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