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

SQlite error when connecting to database
Store Custom Arraylist in SharedPreferences and get it from there?
Retrieve count of method parameters and name of parameters in java
How to get specific substring with option vale using java
Error while extracting REST response in Mule
Java reading txt file from user input and outputting data according to user input
how to create test class and folder from android studio?
JavaParser doesn't update source file
Print a part of string that made a string match regex
Issue with new lines in a JTextArea
ListView Items' background get mixed up when scrolling listView
Weka OneClass Classifier Prediction Error using Java
Android random IOExceptions with CipherInputStream and ObjectInputStream
Replacing and converting strings
Is it possible to define an optional flow or exception-like behaviour in Java 8 streams API?
Trouble printing out pattern in array

Categories

HOME
path-finding
plot
youtube-dl
q
cvs
paw-app
jpeg
binary-tree
installshield
enterprise-library-5
autotools
esper
cloudkit
session-variables
dacpac
google-translate
facebook-php-sdk
php-7.1
circular-dependency
visual-studio-cordova
dosgi
clojurescript
excel-vba-mac
plunker
java-3d
clickonce
wijmo
poltergeist
user-interaction
phpfox
filezilla
fopen
atlassian-crucible
twilio-api
airconsole
google-qpx-express-api
http-get
mapdb
git-merge
restlet
webdriver-manager
greenrobot-eventbus
user-controls
broadcastreceiver
galen
ruby-on-rails-3.1
estimote
businessworks
dropbox-php
elgg
jquery-filter
ableton-live
impresspages
player
pagedlist
prettytensor
blackberry-10
make-install
bluegiga
design-by-contract
goose
two-factor-authentication
qtableview
icu4j
varargs
twirl
createprocessasuser
system32
inmobi
directoryservices
gwidgets
mdt
device-manager
android-radiobutton
jquery-layout
poller
kgdb
java.nio.file
mbr
c18
ccss
easy-install
html-editor
android-hardware
selected
simba
qtkit
netbeans-6.9
qt-jambi
xtype
ecl
gdlib
w3wp.exe
fluent-interface
castle-monorail
compiler-specific
web-architecture
boost-smart-ptr
defensive-programming

Resources

Encrypt Message