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

Setting Java CLASSPATH doesn't work but -cp does
Store file in Restlet put method
java.lang.UnsatisfiedLinkError can not load dll
Spring Hibernate Repository Testing with jUnit
wsjar file error when starting Websphere 7 server using Java 6
libGDX + com.google.android.gms:play-services:7.0.0 : android:dexDebug
Jenkins proxy 407 error
Find all objects in collection Java Mongodb
Access switch declared in XML via java
log4j.xml precedence on local build
Paypal AdaptiveAccounts service and CreateAccount operation-Getting 'Authentication failed' error
Error parsing XML: unbound prefix when i use custom control
How can I declare the suits Diamond and Hearts?
Consuming generic xml soap webservice in Java without wsimport
Example of FindUnrelatedTypesInGenericContainer Bug
Java split with certain patern

Categories

HOME
cakephp
jdo
hive
mediawiki
iot
rsync
react-redux
electronics
windows-server
caml
serverless-framework
after-effects
nhibernate-envers
cx-freeze
abi
claims-based-identity
vlsi
virtualdub
phpfox
ejabberd-module
unboundid
bosh
.net-4.0
xquery-3.0
google-sites-2016
plsql-psp
qwerty
hot-module-replacement
cookiecutter-django
core-plot
quadratic-programming
ibpy
mime
sas-jmp
scorm
termination
promela
memory-alignment
mako
sqldf
or-tools
objective-c-swift-bridge
intrusion-detection
yaws
natvis
srand
r-tree
eclipse-clp
cyclomatic-complexity
0xdbe
tableau-online
generic-programming
nsight
modalpopup
rake-task
android-imagebutton
nsbutton
openexr
fluentautomation
hippomocks
ccss
quantlib-swig
cdc
buster.js
yui-compressor
sabredav
delphi-6
cisco-jtapi
chrono
stage
data-loss
remember-me
site.master
gamequery
xsdobjectgen
modelstate
dbal
brewmp
photoshop-cs4
ti-dsp

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile