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

Can't access office365 using oauth to get user info. Need endpoint and JWT parser
Does spring-boot container create a pool of #service annotated classes or is it handled differently?
Finding a Java lambda from its mangled name in a heap dump
Spring: How to inject a String bean to the constructor?
Create a native Flashlight Android Java plugin for unity 3D
Simple code for Breadth First Search Java
How can I correct the rule of updating the strategic vector in the Linear Reward Inaction algorithm (LRI)
Moving backwards in a singly linked list?
Android Studio: Error of java.lang.NullPointerException when the headlessfragment called
HQL: Two conditions in where clause returning empty result
How to push reference libraries to github through eclipse?
How Convert Microsoft GUID to JAVA UUID?
Loading Customized Transformers in Apache Spark raised a NullPointerException
Parameterised Test Execution in JUnit Jupiter(JUnit5)
Linked List remove
Update JTextArea to show progress

Categories

HOME
openlayers
urbancode
deezer
webstorm
mean-stack
read-eval-print-loop
spring-cloud-stream
react-redux
sharepoint-designer
rubygems
binary-tree
indesign
basic
slick-slider
designer
caml
graphlab
pugjs
jtextfield
abi
tokenize
tar
tapestry
extjs5
kudan
p-value
fish
django-storage
poltergeist
filezilla
fopen
linkerd
buck
ejabberd-module
wtx
atlassian-crucible
libuv
primitive
microsoft-chart-controls
yadcf
pdb
winrt-xaml-toolkit
environment-modules
git-merge
disassembling
jquery-bootgrid
twitch
reportbuilder
opshub
segment
long-polling
youcompleteme
react-scripts
pebble-watch
veracode
recursive-datastructures
font-size
query-performance
crosswalk-runtime
objective-c-swift-bridge
abcpdf9
jquery-filter
savon
login-control
mongocsharpdriver
ubuntu-10.04
livequery
r-tree
mutation-observers
fouc
service-accounts
interrupted-exception
coldbox
google-style-guide
rdtsc
preferences
googlemock
castle
heisenbug
app42
srs
mbr
odata4j
dataadapter
enterprisedb
smtp-auth
typoscript2
reddot
subgurim-maps
rfc1123
yetanotherforum
imac
mongomapper
infrastructure
sproutcore-2
gamma
nintendo-ds
putchar
caching-application-block

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