Reputation: 161
I am using solr to store filepaths and my 'id' (uniquekey) and index its content. When I change the file contents and re-index it, it replaces the contents of the file in the index. Is there anyway I can retain the old version of file under the same id ? I tried adding the overwrite=false parameter with no luck. I am using solr 6.1.0
Upvotes: 2
Views: 581
Reputation: 8678
I think you cannot do that under the same id
as id
is the uniquekey
.
Even its not possible to achieve on RDBMS
type.
It could be achieved by providing another id and maintaining the relations of new id(where the document content is changed, consider it as new document with new id) and then have relation of new id and the old id .
You can have a similar concept for solr as well, but every document you need to have another field like id and older_id
.
Here in the older_id
you can have the id of the document which id the older version and has the content of old document.
And with this your older documents will not be deleted from solr
as they will have the new document and new id
and older_id
the previous document id
.
Upvotes: 1