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

Infinite recursion in Java Program
How to map Dropwizard admin servlet to a route on the public-facing port (8080)
Connect Desktop to iOS Device via Java
Split string has symbols(many pipes) with regex
How to solve situation that seems to require a setter within an interface?
Passing JSON array - Android
how to connenct remote mysql connection in cpanel
Splash screen depends onClick to move on
Java: variable used in run method, initialized in for loop is not recognized in for loop's statement
JAVA loop moving objects from bottom of applet to top of applet
my button cannot find a method in the MainActivity.java file
toolbar.getChildCount() returns 0
PostgreSQL: going to run out of IDs in integer columns
Method still running after compiler reads it [closed]
how to check JBOSS version using ANT script
How can I reference a super method in a Java class that implements an interface but does not extend another class?

Categories

HOME
client
variables
isabelle
xmpp
gis
sharepoint-designer
blueprintjs
fancybox
applepay
reveal.js
remote-access
iron-router
uitypeeditor
opentracing
tostring
sms-gateway
grails3
ml
cloudhub
kudan
hammerspoon
icloud-api
dxf
emgucv
windows-error-reporting
spring-mybatis
elasticsearch-net
compatibility
librato
flink-streaming
instant-messaging
.net-4.0
fusionpbx
http-digest
gesture
tasker
sas-visual-analytics
eigenvalue
estimote
arena-simulation
netcdf4
angular2-meteor
user-accounts
rainbowtable
pubmed
jlink
mplayer
brightcove
directory-structure
cudafy.net
gcsfuse
nbconvert
bind9
dwscript
mediaelement
messenger
cubes
url-masking
fputcsv
connect-by
netmq
uid
tmuxinator
coveralls
createprocessasuser
proj4js
facebook-graph-api-v2.4
gui-test-framework
asp.net-dynamic-data
qcodo
ceil
dml
algebraic-data-types
file-locking
ora-00911
android-screen-support
pvrtc
jquery-knob
chuck
gdata-api
dice
pydot
deobfuscation
coredump
yetanotherforum
lang
.nettiers
revisions
dentrix
suppress
dbal
mirah
bespin
javap
noscript
putchar
post-build
grid-system

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