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

Organizing Resources for a Java Game
Eclipse editor does not become dirty when I change the text
Adding to the the end of a linked list
Error : Comparison method violates its general contract
Wordwrap in Slick2d True Type font
GUI behaves weirdly after adding new objects and resizing [duplicate]
The Tomcat server deletes the folder when compiling the program
Unable to understand the logic of the part to the right of assignment operator when creating object of inner class [duplicate]
Google Analytics API 4 Java client running from command com.google.analyticsreporting.v4 package does not exist
Get fingerprint from mp3 file
must call setup() that takes a context and fragmentmanager - Rendering issue
Why my getName() method is not starting from the first row in my csv file?
Having issues with my email
Antiderivative with apache.commons.math?
Prevent elastic search java client from retrying
What is the right way to use Espresso in android?

Categories

HOME
wso2
keycloak
mediawiki
mockito
path-finding
appx
iterator
stock
hp-exstream
sd-card
android-4.4-kitkat
xmpp
framework7
maven-3
baqend
webrequest
applepay
postgres-xl
static-libraries
messages
vaadin7
uitypeeditor
swiftlint
amazonsellercentral
facebook-instant-articles
sox
mustache.php
vlsi
buildbot
su
url-scheme
rst2pdf
libuv
key-value-observing
twilio-api
contact-form
jspresso
windows-dev-center
accelerate-framework
automake
dynamics-crm-2013
ansible-playbook
cookiecutter-django
user-controls
google-closure
s
jedis
setter
diagnostics
composite-key
flutterwave
quartz-composer
topbeat
jquery-filter
wdf
static-ip-address
nxt
instant
android-textview
player
connect-by
ready-api
packagist
bluegiga
unity-networking
pervasive-sql
tcpserver
icu4j
marching-cubes
key-management
device-orientation
ng-animate
document-classification
picturefill
hyprlinkr
message-driven-bean
html5-notifications
gnu-smalltalk
ccss
listings
tws
html4
django-nonrel
type-equivalence
free-variable
typoscript2
ohm
punbb
boost-filesystem
spyware
tomcat-valve
horizontal-accordion
oncheckedchanged
lpeg
gamequery
revisions
filtered-index
mirah
anti-piracy
pascal-fc
putchar
w3wp
msdev
uiq3

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App