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 - HTTPS GET call fails from EC2 instance with handshake_failure, works locally
How to Iteratre over Future<List> Object?
Return an array of strings containing all sub-sequences for s (except the empty string) ordered lexicographically?
UI does not update after Face Book request…why?
set extension in OpenRTB Protobuf Java
How to use VrVideoView(Google VR) on a SurfaceView
Get actual cell value of excel cell with POI without defining a datatype
Is there a pattern for dynamically loadable modules in Spring Boot?
java: how to calculate multiplication between all values in variable difference
Websocket Spring 4
Run your request and receive new data Json
Avoiding Replacing Constant Reference With a Literal When Compiled [duplicate]
How to check in Java that XSD is valid
Can I wrap a FilterOutputStream with another FilterOutputStream?
Best way to update and notify by service a JSON get request
HttpUrlConnection issue from Eclipse and windows 10

Categories

HOME
amazon-ec2
isabelle
cplex
webstorm
framework7
sqlite-net-extensions
paw-app
amazon-ecs
frameworks
sqlite3
win32gui
google-translate
kibana-4
spring-kafka
spring-xd
quicklook
vb.net-2010
size
percona
netflix
viewport
cx-freeze
autoconf
rundeck
centos6.5
selectedindexchanged
chromebook
internet-explorer-9
jaxb2
key-value-observing
exuberant-ctags
siesta-swift
google-sites-2016
winrt-xaml-toolkit
framemaker
android-kernel
android-nestedscrollview
normal-distribution
environment-modules
stacked
dosbox
space-complexity
hot-module-replacement
starteam
c11
webdriver-manager
elasticsearch-plugin
android-tabhost
eclipse-scout
thin
websphere-mq-fte
skeleton-css-boilerplate
filepicker
hendrix
knpmenubundle
specrun
visual-c++-2008
ado.net-entity-data-model
file-writing
asp.net-4.5
pcf
merge-conflict-resolution
hover-over
php-parse-error
cloudbees
collapse
cyclomatic-complexity
quicklisp
tarjans-algorithm
responsive-images
sailfish-os
nsight
census
pretty-print
streambase
jsonpickle
nstableviewcell
gadt
tablelayout
xojo
project-planning
bundles
jplaton
eventlistener
libstdc++
ticoredatasync
qtkit
custom-backend
php-parser
gnu-prolog
django-tagging
sql-server-profiler
floating
site.master
blitz++
createwindow
ext3
firefox4
backcolor

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