lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noble Paul നോബിള്‍ नोब्ळ्" <noble.p...@gmail.com>
Subject Re: dataimporter last_index_something
Date Wed, 02 Jul 2008 04:12:28 GMT
Currently there is nothing . There is a hackish way to achieve it.
DIH allows to read values from request params and use it in the templates.
eg: query="select * from atable where id > ${dataimporter.request.last_id}"

so, DIH must be invoked with the extra request param last_id like this
http://<host>:<port>/solr/dataimport?command=<the-command>&
last_id=23545

But your application will have to maintain the last_id somewhere externally.

Let us think of a cleaner solution which can be incorporated into DIH later.

How about providing an API
context.persistAttribute("<my_varname>","value"). Which you can read
as ${dataimporter.my_varname}?

--Noble




On Wed, Jul 2, 2008 at 12:54 AM, Jeremy Hinegardner
<jeremy@hinegardner.org> wrote:
> Hi all,
>
> I'm using the dataimport patch, and it is working wonderfully. I
> had one question though.  Is there a way to pick some other "last_index"
> value that could be selected on a per entity basis?  Right now it is
> just last_index_time which is great, except for a table that doesn't
> have modified timestamp column.
>
> I have one table that has no timestamps in it, the rows don't change,
> but new ones do get added.  And instead of doing a full-import every
> time for that table it would be helpful to be able to do a delta but use
> the ever increasing  (in this table) 'id' column in the database to know
> if new values have been added.
>
> Or if there is another method that might have the same result, that
> would be good to know too.
>
> enjoy,
>
> -jeremy
>
> --
> ========================================================================
>  Jeremy Hinegardner                              jeremy@hinegardner.org
>
>

Mime
View raw message