[ 
https://issues.apache.org/jira/browse/SOLR-6294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14078170#comment-14078170
 ] 

Hoss Man commented on SOLR-6294:
--------------------------------

bq. By contrast, a document (with the exception of nested docs) will always 
have flat ...

...the exception that complicates the rule.

Hueristics would just lead us down a rabbit hole of complexity with no good way 
out.  

the idea of a "json.command" (or something like that) request param seems like 
it solves all of the suggested usecases.  

we can always add an "/update/json/single" or something to the sample configs 
if people find even that burdensome ... we can also change the default value of 
the new request param (and thus, the default behavior) in 5.0 so that by 
default we assume everything is a doc, and you have to send "json.command=true" 
if you want your top level braces to be interpreted as starting a set of 
commands.

> 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]

Reply via email to