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

ClassNotFound Exception for “com.mysql.jdbc.Driver” even after adding mysql-con.jar file
Which Java Graph API is best and support graph object clonning?
face recognition using opencv nullpointer exception [duplicate]
Jersey 1.9 RESTful service resource base redefinition
Base64Binary interpreted as byte[][]
jol footprint of HashMap<Integer, Integer>
Realm android, delete object and update while keeping model
Android Studio listFiles returns null with assets folder
Google Cloud Translation Api Error
Groovy: Convert json request parameter to Map
NoSuchMethodError: scala.Predef$.$conforms()Lscala/Predef$$less$colon$less
Customizing login page of MS Exchange using asp
What is the Libwebcore library in android architecture?
How to configure delimiter in SMOOKS EDIFACT - XML parser
React Native JWPlayer Android SDK
JavaFX Line chart Heap usage

Categories

HOME
osgi
clips
keycloak
view
onedrive
vmware
rubygems
ebean
append
basic
tomcat6
offline
row
u-sql
quickfix
carthage
lombok
evopdf
ab-testing
introduction
dbext
reverse-proxy
mps
tapestry
rundeck
h2db
su
xacml
jspm
gsmcomm
nat
atl
hilbert-curve
xenforo
ssjs
elasticsearch-plugin
core-plot
isbn
total-commander
flashair
executenonquery
upstart
pango
hls.js
tropo
brightcove
worker-thread
memory-alignment
rotativa
login-control
nsviewcontroller
qcustomplot
two-factor-authentication
uid
jfugue
computer-algebra-systems
sailfish-os
sniffer
composite
lustre
c++03
fscommand
coldbox
file-copying
googlemock
android-radiobutton
typeof
contenttype
valuechangelistener
didselectrowatindexpath
centos5
mcts
gnu-smalltalk
.aspxauth
jmapviewer
mylyn
chronoforms
html-editor
wsdl-2.0
word-processor
propertyeditor
hosts-file
onsubmit
objective-c-2.0
ocx
gcj
heartbeat
javax.script
yslow
mirah
vc90
kdbg
javap
rtml

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile