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

Nested if statements vs complex logic in condition
Is there any way to change the monitor orientation in Java (OSX/Windows, NOT android)?
how to automate desktop application authorization process?
How to make a contact form that sends me mails in Spring + thymeleaf
IntelliJ IDEA won't step into method in third party jar
selenium installation hurdle “importfirefoxdriver”
MediaPlayer doesn't work, error (1, -2147483648), Prepare failed.: status=0x1
Serialize multiple entries to the same file
Filling a progressbar via a variable [closed]
Regular expression to return results that do not match selection
Having trouble with a one dimensional array
spring security custom login form
Which methods must be ideally overriden for a collection of custom object eg: Customer? [closed]
GPG encryption working from mac terminal but not from java Runtime.getRuntime().exec()
JavaFX - Extra horizontal space in drawing arrows after rotation
Thread safety of Vertx event loops whose handlers modify shared resource

Categories

HOME
xamarin
clips
hive
zeromq
image-processing
path-finding
tinymce
hashmap
mean-stack
rsyslog
programming-languages
electronics
indesign
podio
webrequest
contact
amazon-cloudformation
gorm
handsontable
modx-revolution
mapserver
http-status-code-504
ab-testing
visual-composer
clickonce
accessor
mustache.php
jndi
android-widget
smb
numerical-methods
vlsi
facebook-access-token
react-css-modules
jaxb2
vision
nat
javascriptcore
contact-form
main
serve
neuroscience
withings
objectlistview
ssjs
ansible-playbook
awt
botbuilder
nand2tetris
midl
unixodbc
logparser
worksheet
winscp-net
domain-model
elgg
pg-dump
sybase-asa
namecoin
jspdf-autotable
bind9
webdriverjs
background-service
android-fonts
heidisql
storekit
master-slave
freelancer.com-api
spidermonkey
jqgrid-formatter
angular-leaflet-directive
processmodel
unity5.2.3
csquery
website-monitoring
rdl
heisenbug
mysql-error-1062
mbr
quartz-graphics
easy-install
dmoz
mt
jspinclude
appconkit
assembly-loading
window-management
deobfuscation
subgurim-maps
rfc1123
inotifycollectionchanged
memory-size
noscript
pascal-fc
ugc
data-acquisition

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile