Optimistic Concurrency Solr Tutorial
_version_ client reads a document client resubmits the changed document to solr go back to step 1 if step 3 fails with HTTP error code 409 (version conflict) For simple field updates or modifications, see Atomic Updates Versioning _version_ field to all documents. A client can specify a value for _version_ _version_ 1 Specifying version on an update For an add, it's easiest to simply specify _version_ by adding it as a field in the document along with the other fields (see the Example below). It's also possible to specify _version_ $ curl http://localhost:8983/solr/update?_version_=7 -H 'Content-type:application/json' -d '[{"id":"smalldoc"}]' Delete operations with optimistic concurrency currently need to use the URL method to specify _version_ $ curl http://localhost:8983/solr/update -H 'Content-type:application/json' -d ' [ {"id":"book1", "title":"Neuromancer","author":"William Gibson", "copiesIn_i":7, "copiesOut_i":Read full article from Optimistic Concurrency Solr Tutorial
No comments:
Post a Comment