You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Scott Bigelow <ep...@gmail.com> on 2011/04/25 02:07:40 UTC

DIH: Using MAX(PrimaryKey) as delta identifier instead of dataimporter.last_index_time

In DataImportHandler, is it possible to use the prior maximum value of
the PrimaryKey in the delta query, as opposed to (or in addition to)
using "dataimporter.last_index_time"? We already have Created_On and
Updated_On fields, but we've only indexed the Updated_On fields. I was
hoping for something like

SELECT column1,column2 FROM t_table WHERE Updated_On >
{dataimporter.last_index_time} OR table_primary_key >
{dataimporter.last_max_primary_key}

I'd hate to add an index on Created_On just so it could track new rows
since the last run, when the maximum primary key could easily catch
those rows.