lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liwen(李文).apabi <l....@FOUNDER.COM.CN>
Subject 答复: How to get the docs id after commit
Date Mon, 11 May 2015 00:38:16 GMT
Sorry. The "newest" means all the docs that last committed, I need to get ids of these docs
to trigger another server to do something.

发件人: Erick Erickson [] 
发送时间: 2015年5月10日 23:22
主题: Re: How to get the docs id after commit

Not really. It's an ambiguous thing though, what's a "newest" document
when a whole batch is committed at once? And in distributed mode, you
can fire docs to any node in the cloud and they'll get to the right
shard, but order is not guaranteed so "newest" is a fuzzy concept.

I'd put a counter in my docs that I guaranteed was increasing and just
q=*:*&rows=1&sort=timestamp desc. That should give you the most recent
doc. Beware using a timestamp though if you're not absolutely sure
that the clock times you use are comparable!


On Sun, May 10, 2015 at 12:57 AM, liwen(李文).apabi <> wrote:
> Hi, Solr Developers
>       I want to get the newest commited docs in the postcommit event, then nofity the
other server which data can be used, but I can not find any way to get the newest docs after
commited, so is there any way to do this?
>          Thank you.
>          Wen Li

View raw message