You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Mou <mo...@gmail.com> on 2020/01/31 19:48:20 UTC

How do I send multiple user version parameter value for a delet by id request with multiple IDs ?

http://solr:port/collection/update?version_field=1234582.0 

works for the payload  

{"delete":[{"id":"51"},{"id":"5"}]} with multiple ids and the version
parameter is applied to both requests.

Is it possible to send separate version numbers for the ids in the parameter
?



--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: How do I send multiple user version parameter value for a delet by id request with multiple IDs ?

Posted by Chris Hostetter <ho...@fucit.org>.
: Subject: How do I send multiple user version parameter value for a delet by id
:      request with multiple IDs ?

If you're talking about Solr's normal optimistic concurrency version 
constraints then you just pass '_version_' with each delete block...

https://lucene.apache.org/solr/guide/8_4/uploading-data-with-index-handlers.html#sending-json-update-commands

{"delete":[{"id":"51", "_version_":123445},
           {"id":"5", "_version_":67890}]}

...but it shounds like maybe you're talking about using the 
DocBasedVersionConstraintsProcessorFactory ? ... in which case I don't 
think what you're asking about is possible ... I'm pretty sure it's 
deletion logic assumes you'll send only one delete at a time.

As a workaround, you can send the "tombstone" documents yourself (instead 
of relying on DocBasedVersionConstraintsProcessorFactory to intercept the 
deleteById commands and convert then into tombstones for you.)


-Hoss
http://www.lucidworks.com/