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 - Use binarySearch to find # of occurrences of certain element in array, without If
Injecting EJB in spring
Setting request body on JAX-RS 2.0 Client API With RestEasy
Morphia #Version Not Working
Threadpool Deadlock: designing against or detecting
Random array from resource Android
JAXB: How to convert Map to array-like format
Can't get SQL query results to display on a JSP Page table?
Extended child object inheritance in Hibernate
Pass Data from Fragment to Fragment Through Button Click
Escaping individual characters in a character class
cannot compile a simple hbase java program
java.util.NoSuchElementException Error?
Java 8 Method references called on a local variable
Whenever I run the android login application it just crashes an a series of error messages in log
measure short distance android GPS

Categories

HOME
pandas
winforms
vbscript
blogger
openmp
amazon-ec2
appx
bookshelf.js
google-docs
gitpitch
ssl-client-authentication
floating-action-button
quicklook
spring-tool-suite
seaborn
serilog
openedx
autocad-plugin
physics-engine
realex-payments-api
xpages-ssjs
facet
semantic-analysis
user-interaction
internet-explorer-9
filezilla
rst2pdf
spring-mybatis
nameservers
typed.js
webtest
openoffice.org
sequential
document.write
bootstrapper
greenrobot-eventbus
nxlog
gpx
slick-3.0
togetherjs
knpmenubundle
akka-cluster
pearson
spring-mongodb
bind9
mediaelement
pycaffe
angular-strap
dstu2-fhir
qpid
angstrom-linux
hill-climbing
hover-over
bluemix-app-scan
javax.sound.midi
spim
angular-leaflet-directive
drawbitmap
fluid-dynamics
graph-api-explorer
javax.mail
typekit
camanjs
asp.net-dynamic-data
java.util.concurrent
qcodo
rdtsc
device-manager
code-access-security
yorick
hippomocks
xsockets.net
jmapviewer
spring-io
web2py-modules
blending
quartz-graphics
dataadapter
interface-orientation
factory-method
google-email-migration
word-processor
venn-diagram
errai
nsmanagedobject
cinema-4d
pyinotify
wise
icanhaz.js
ti-dsp
ctp4
boost-smart-ptr
temporal-database

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