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

HeXin updated SOLR-5193:
------------------------

    Summary: Atomic update should add one function to check whether the 
uniqueKey is already existing  (was: Atomic update should add one function to 
check the whether uniqueKey is already existing)
    
> Atomic update should add one function to check whether the uniqueKey is 
> already existing
> ----------------------------------------------------------------------------------------
>
>                 Key: SOLR-5193
>                 URL: https://issues.apache.org/jira/browse/SOLR-5193
>             Project: Solr
>          Issue Type: Improvement
>          Components: update
>    Affects Versions: 4.4
>            Reporter: HeXin
>            Priority: Minor
>             Fix For: 4.5, 5.0
>
>
> When we use below code to update doc:
> curl http://localhost:8983/solr/update -H 'Content-type:application/json' -d '
> [
>  {
>   "id"        : "TestDoc1",
>   "publisher" : {"set":"TestPublisher"}
>  }
> ]'
> Sometimes we want that the publisher field updates only when the id of 
> TestDoc1 has already existed in solr. Because if the "TestDoc1" doesn't exist 
> in solr, it is useless to add just one field for the doc. 
> Therefore, i think we can support additional syntax tocheck whether the 
> uniquekey is already existing just like below: 
> curl http://localhost:8983/solr/update -H 'Content-type:application/json' -d '
> [
>  {
>   "id"        : {"check": "TestDoc1"}
>   "publisher" : {"set":"TestPublisher"}
>  }
> ]'

--
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to