I think if you try hard enough, it is possible to get Solr to keep multiple documents that would normally keep only the latest version. They will just have different internal lucene id.
This may of course break a lot of other things like SolrCloud and possibly facet counts. So, I would ask the actual business case first. It is entirely possible that there are other ways to achieve the desired objectives. Regards, Alex. On 19 September 2018 at 00:17, Walter Underwood <wun...@wunderwood.org> wrote: > No. Solr only has one version of a document. It is not a multi-version > database. > > Each replica will return the newest version it has. > > wunder > Walter Underwood > wun...@wunderwood.org > http://observer.wunderwood.org/ (my blog) > >> On Sep 18, 2018, at 7:11 PM, zhenyuan wei <tins...@gmail.com> wrote: >> >> Hi all, >> add solr document with overwrite=false will keepping multi version >> documents, >> My question is : >> 1. How to search newest documents?with what options? >> 2. How to delete old version < newest version documents? >> >> for example: >> { >> "id":"1002", >> "name":["james"], >> "_version_":1611998319085617152, >> "name_str":["james"]}, >> { >> "id":"1002", >> "name":["lily"], >> "_version_":1611998307815522304, >> "name_str":["lily"]}, >> { >> "id":"1002", >> "name":["lucy"], >> "_version_":1611998248265842688, >> "name_str":["lucy"]}] >> >> 1. curl http://localhost:8983/solr/collection001/query?q=*:* return all >> , >> how to search to make response return the newest one? >> 2. how to delete document of version >> [1611998307815522304,1611998248265842688] , >> which is older then 1611998319085617152. >