lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: How to get the docs id after commit
Date Fri, 08 May 2015 16:50:07 GMT
Not that I know of. "newest doc id" is pretty ambiguous. If I transmit
a batch of 100 docs then commit, they're all committed at once. Which
one, then, is "newest"? And consider what happens if (in SolrCloud)
mode, I send updates to two separate nodes. The docs are forwarded to
the leader for the shard they belong on, and arrival order is not
guaranteed so which one is "newest"?

Your best bet I think is to include, say, a timestamp or some such
that represents what you consider "newest", then just do a *:* query
and sort by your marker descending. The first doc returned will be
what you defined as "newest".


On Fri, May 8, 2015 at 12:56 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