You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pysolr add() function has a parameter "overwrite" with behavior:
if overwrite is "true" and document with unique id existing then Solr delete it and add to collection as new document. As a result, if after first document adds it has been updated, we lost thease changes.
if overwrite is "false", Solr just assume this document is unique and add to collection with same uniq id and other version field value. As a result we have many documents with same uniq id:
<uniqueKey>id</uniqueKey>
To solve this problem add to pysolr add/_update function boolean parameter createIfNotExists (or parameter to control _version_ ) as: if createIfNotExists: query_vars.append("_version_=-1")
Pysolr add() function has a parameter "overwrite" with behavior:
if overwrite is "true" and document with unique id existing then Solr delete it and add to collection as new document. As a result, if after first document adds it has been updated, we lost thease changes.
if overwrite is "false", Solr just assume this document is unique and add to collection with same uniq id and other version field value. As a result we have many documents with same uniq id:
<uniqueKey>id</uniqueKey>
To solve this problem add to pysolr add/_update function boolean parameter createIfNotExists (or parameter to control _version_ ) as:
if createIfNotExists: query_vars.append("_version_=-1")
In documentation https://solr.apache.org/guide/6_6/updating-parts-of-documents.html#UpdatingPartsofDocuments-OptimisticConcurrency
The text was updated successfully, but these errors were encountered: