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.lang.NoClassDefFoundError: org.openqa.selenium.htmlunit.HtmlUnitDriver
Unable to align chat messages according to the sender in RecyclerView
Querydsl - Exception in thread “main” java.lang.IllegalArgumentException: No sources given
java.io.FileNotFoundException: (Operation not permitted) error with ./keytool -import on mac osx (el capitan) - Java 6
Eclipse 3.8 to 4.6 Migration Platform.getPlugin() returns null
Unmarshalling “any” type from inbound schema
Android: Fragment is not attached to Activity error
Running job in hadoop- ERROR security.UserGroupInformation
Obtain specific part of URL
Spring - Embdedded H2 Test Db
How would I display an Image, and overlay a button in Java? [duplicate]
How to change textview text from another activity on button click in android studio?
Three-level nesting in elasticsearch
InvalidSelectorException - Selenium Webdriver support to recognize accent letters
Form validation with Spring Security login page
Python - IPython Notebook fails to find the Java executable

Categories

HOME
pdf
openmp
iot
setup-deployment
win32gui
sql-server-2016
ebean
opengl-es-2.0
mouse
append
node-pdfkit
postgres-xl
apache-cayenne
hex-editors
hapi
carthage
facebook-page
evopdf
normalizr
ml
chromium-embedded
format-specifiers
firebase-crash-reporting
one-to-many
brunch
info.plist
fopen
facebook-apps
objectanimator
newline
gsmcomm
nat
google-rich-snippets
junit5
perlin-noise
openoffice.org
hexo
jmonkeyengine
retina-display
lto
starteam
android-fingerprint-api
fakeiteasy
jedis
promela
celery-task
tropo
or-tools
medium.com
url-pattern
radtreelist
ado.net-entity-data-model
pcf
firebaseui
react-native-listview
bgp
rvest
yaws
pagerank
goose
t4mvc
cyclomatic-complexity
qdialog
atk4
purge
responsive-images
graph-drawing
operation
vstest.console.exe
oberon
angular-local-storage
inmobi
googlemock
typeof
algebraic-data-types
page-layout
inbox
easy-install
excel-2003
gwt-rpc
interface-orientation
limejs
ocunit
hosts-file
getmessage
osql
gnustep
external-accessory
subgurim-maps
file-comparison
yui-datatable
krl
actionview
oncheckedchanged
revisions
firefox4
ti-dsp
privilege
phonon
procedural-music
mediarss
post-build
.net-1.0

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