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

Java MVC, Factory and Observer patterns together
How to check how many words start with a, b, c, d, etc.?
Number of singleton instances created in case of multiple deployments [duplicate]
String in Java : charAt Function use
Execute a CallableStatement blocks the application
How to generate surefire-report.html using eclipse
Better way to map Java object to object
How to pass List<String> from controller to <form:select> in Spring 4.0.0
testing service with mockito and spring
Eternal error java.io.StreamCorruptedException: invalid type code: AC
How to add java listeners to java component in Matlab?
ReplaceAll in Java
Vaadin Navigator NPE
Couldn't read row 0, col -1 from CursorWindow Displaying Records
repaint doesn't work in serial event
Spring boot and configuration profile

Categories

HOME
openlayers
asp.net-core
openstack
mediawiki
deezer
hp-exstream
setup-deployment
windows-server
pivotal-cloud-foundry
acquia
indesign
slurm
communication
volttron
spring-tool-suite
quartz-scheduler
pc
one-hot-encoding
tokenize
blazemeter
cas
apache-commons-io
windows-error-reporting
applozic
webkitspeechrecognition
nat
google-rich-snippets
key-value-observing
oracle-fusion-middleware
perlin-noise
sequential
overriding
suricata
libvpx
streamsets
unspecified
temporary-files
squib
eclipse-scout
core-plot
texmaker
modelmapper
jlink
tizen-native-app
aurelia-validation
pg-dump
google-perftools
media-player
memory-alignment
mcafee
quartz-composer
migradoc
root-framework
elements
fody
trash
skobbler-maps
angstrom-linux
flash-cs5
fadeout
rtbkit
ruby-2.2
tmuxinator
dundas
proj4js
oxwall
socketexception
xcode-6.2
jquery-layout
expected-exception
resty-gwt
fmod
jsctypes
dir
odata4j
dotnetnuke-5
jplaton
shellexecute
http-unit
robotics-studio
distutils
isnullorempty
trusted
cascalog
dotnethighcharts
ohm
subscript
pydot
deobfuscation
subgurim-maps
floating
.nettiers
dbal
compiler-specific
iweb
putchar





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