lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: Newest docs added
Date Fri, 26 Feb 2016 23:06:12 GMT
On 2/26/2016 3:53 PM, Toke Eskildsen wrote:
> MarkG <> wrote:
>> Is there a way anyone can recommend to identify newly added docs to a Solr
>> index. Ie: I have some new docs. I update the index with the new doc and
>> this happens on a regular basis, say every 4 weeks. I want to be able to
>> distinguish the docs that are new given in a certain number of days, say 10
>> days from the time the index had the new doc added.
> and a 'timestamp:[NOW/DAY-10DAYS TO *]' query?

I didn't know about the timestamp update processor.  That's pretty cool,
and now that I really think about it, would be required for SolrCloud to
operate sanely.

If you're not running SolrCloud, then it can be handled with a config
that's even easier.  You can add a field like the following to your
schema, and make sure that your indexing never includes this field:

   <field name="index_last_mod_internal" type="tdate" indexed="true"
stored="true" docValues="true" default="NOW"/>

That's copied straight out of one of the schemas I'm using.


View raw message