[
https://issues.apache.org/jira/browse/SOLR-6294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14079239#comment-14079239
]
Yonik Seeley commented on SOLR-6294:
------------------------------------
bq. No document gets added.
Lovely. (sarcasm)
It's treating the body as key/value query parameters (i.e. respecting the
content-type that curl puts in there by default).
You can see this in the log where the whole body is treated as a key without a
value:
{code}
19602 [qtp316753575-14] INFO
org.apache.solr.update.processor.LogUpdateProcessor – [collection1]
webapp=/solr path=/update/json params={commit=true&
[
{"id" : "1", "title" : "test"}
]=} {commit=} 0 6
{code}
> The JsonLoader should accept a single doc without wrapping in an array
> ----------------------------------------------------------------------
>
> Key: SOLR-6294
> URL: https://issues.apache.org/jira/browse/SOLR-6294
> Project: Solr
> Issue Type: Bug
> Components: update
> Reporter: Noble Paul
> Assignee: Noble Paul
> Priority: Minor
>
> This is the multi document input command
> {noformat}
> curl http://localhost:8983/solr/update/json -H
> 'Content-type:application/json' -d '
> [
> {"id" : "TestDoc1", "title" : "test1"},
> ]'
> {noformat}
> The following also should be a valid update command for a single doc
> {noformat}
> curl http://localhost:8983/solr/update/json -H
> 'Content-type:application/json' -d '
> {"id" : "TestDoc1", "title" : "test1"},
> '
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]