Re: Prevent Solr overwriting documents

2019-11-27 Thread Walter Underwood
That would be “do-not-overwrite”. wunder Walter Underwood wun...@wunderwood.org http://observer.wunderwood.org/ (my blog) > On Nov 27, 2019, at 4:38 PM, Walter Underwood wrote: > > Even if that works, it is evil as something to leave in a client codebase. > Maybe a do-no-overwrite flag would

Re: Prevent Solr overwriting documents

2019-11-27 Thread Walter Underwood
Even if that works, it is evil as something to leave in a client codebase. Maybe a do-no-overwrite flag would be useful. wunder Walter Underwood wun...@wunderwood.org http://observer.wunderwood.org/ (my blog) > On Nov 27, 2019, at 3:24 PM, Alexandre Rafalovitch wrote: > > How about Optimistic

Re: Prevent Solr overwriting documents

2019-11-27 Thread Alexandre Rafalovitch
Oops. And the link... https://lucene.apache.org/solr/guide/6_6/updating-parts-of-documents.html#UpdatingPartsofDocuments-OptimisticConcurrency On Wed, Nov 27, 2019, 6:24 PM Alexandre Rafalovitch, wrote: > How about Optimistic Concurrency with _version_ set to negative value? > > You could inject

Re: Prevent Solr overwriting documents

2019-11-27 Thread Alexandre Rafalovitch
How about Optimistic Concurrency with _version_ set to negative value? You could inject that extra value in URP chain if need be. Regards, Alex On Wed, Nov 27, 2019, 5:41 PM Aaron Hoffer, wrote: > We want to prevent Solr from overwriting an existing document if document's > ID already exis

Prevent Solr overwriting documents

2019-11-27 Thread Aaron Hoffer
We want to prevent Solr from overwriting an existing document if document's ID already exists in the core. This unit test fails because the update/overwrite is permitted: public void testUpdateProhibited() { final Index index = baseInstance(); indexRepository.save(index); Index index0 = ind