Thanks for your explaination. @Alexandre Rafalovitch  @Walter Underwood

    My case is use SOLR as  an Index Service of  some NoSQL systems,it is
 a  common Requirement   to
guarantee the consistency of index&source data .
    There maybe  TWO ways to write source data/index:
     1. write index to solr first, then write source data to NoSQL system.
        if write NoSQL failed,I want to rollback solr update。due to solr
not support rollback,I have ever
       think to use multi-version to implement this  feature, but ,feel
disappointed。

     2. write source data first, then wirte index to solr.  this is my
current implementation。and I found it fit for me。










Alexandre Rafalovitch <arafa...@gmail.com> 于2018年9月19日周三 下午1:41写道:

> 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.
> >
>

Reply via email to