[ 
https://issues.apache.org/jira/browse/SOLR-3887?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hoss Man updated SOLR-3887:
---------------------------

    Fix Version/s:     (was: 4.0)

Jesse: thanks for your patch.  

This looks like it should be a valuable feature, but at this point in the 4.0 
release cycle we are focusing only on merging bug fixes to the 4.0 release 
branch, so i'm removing that as an intended fix version.
                
> Add support for arrays of operations to JSON Update Handler
> -----------------------------------------------------------
>
>                 Key: SOLR-3887
>                 URL: https://issues.apache.org/jira/browse/SOLR-3887
>             Project: Solr
>          Issue Type: Improvement
>          Components: update
>    Affects Versions: 4.0-BETA
>            Reporter: Jesse Dubay
>            Priority: Minor
>              Labels: json, update
>         Attachments: SOLR-3887.patch
>
>
> Currently, UpdateRequestHandler accepts a sequence of operations in JSON 
> format by specifying duplicate keys. While duplicate keys aren't forbidden by 
> the JSON spec, in practice, this makes the update handler difficult to use in 
> conjunction with JSON serialization libraries in clients.
> This has been mitigated somewhat by adding special syntax to add and delete 
> in SOLR-2496 and SOLR-3508 respectively, but there's still no way to specify 
> operations in a particular sequence as you can with XML. Per the JSON spec, 
> the right way to do this is with an array, as objects are considered 
> unordered sets.
> Using an array at the top level would obviate the need for such a key, but 
> that syntax was used in the fix for SOLR-2496 as a shortcut for adds, so...
> The attached patch adds an "operations" key that can exist at the same level 
> as any other operation. The "operations" key's value is an array of objects, 
> each of which uses the same syntax as the root object:
> {code}
> {
>   "operations": [
>       {"add": {"id": "1"}},
>       {"delete": {"query": "foo"}},
>       {"add": {"id": "2"}},
>       {"commit": {}},
>   ]
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to