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

Ordering a HashMap by Key?
Need current date is in “UTC” timezone having Date format [duplicate]
Hibernate ORM produce unwanted SQL updates on flush after persisting transient entity
Zero supported devices when publishing to play store
Apache FTPSClient Cross OS Issue
Create Web Service (SOAP or REST) using Struts2 and hibernate
Where is the  (C2) coming from
Unable to accept QuickBlox RTC Call due to org.webrtc.PeerConnection.setRemoteDescription null pointer exception
OpenCV Adaptive Thresholding in Java
Java Program using Linked List [closed]
Performance issue with javafx application
Why doesn't [[a-z]*&&[^a]] catch “bc”, but “b”?
want use com.mcxiaoke.volley in android project
Propagation of transactions in Spring is flaky
How to hook eclipse save on editor close action
Sending string from android client to python server over socket

Categories

HOME
gerrit
openstack
c#-4.0
azure-data-factory
plone
iterator
relayjs
platform-builder
framework7
analysis
twitter-bootstrap-4
contact
midi
kentor-authservices
google-cloud-spanner
alignment
leiningen
django-simple-history
solaris-10
code-review
beyondcompare
karma-jasmine
visual-composer
grails3
reverse-proxy
one-hot-encoding
cx-freeze
cultureinfo
claims-based-identity
javacv
cas
bootstrap-material-design
log4js-node
compatibility
directx-10
google-cloud-endpoints-v2
webtest
multilingual
mixture-model
xenforo
optix
mapzen
isbn
reactive-cocoa-5
segment
hibernate-tools
jquery-nestable
dropbox-php
statsd
snmptrapd
np-complete
knpmenubundle
arrow-keys
nbconvert
minimization
query-performance
background-service
firmata
android-fonts
rotativa
home-directory
adxstudio-portals
trash
xml-attribute
blackberry-10
sdf
itextpdf
unity-networking
rtbkit
srand
sdhc
processmodel
generic-programming
nsight
dundas
rake-task
wordpress-theme-customize
typeof
navigationservice
mbr
openlaszlo
quantlib-swig
jmapviewer
lcs
jelly
wsdl-2.0
libstdc++
nsmanagedobject
reddot
yetanotherforum
yui-datatable
sql-server-profiler
dbal
bespin
perfect-hash
brewmp
kdbg
ctp4
port-number

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile