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 Christof Lorenz <lo...@web.de> on 2014/08/10 13:51:37 UTC
SqlEntityProcessor
Hi folks,
i am searching for a way to update a certain column in the rdbms for
each
item as soon as the item was indexed by solr.
The column will be the indicator in the delta-query to select un-indexed
items.
We don't want to use the timestamp based mechanism that is default.
Any ideas how we could implement this ?
Regards,
Lochri
Re: SqlEntityProcessor
Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Custom UpdateRequestProcessor that collects the IDs of submitted
documents and updates the database on commit.
DataImportHandler itself is strictly one-way read operation. But you
can add URP chain after it.
Regards,
Alex.
Personal: http://www.outerthoughts.com/ and @arafalov
Solr resources and newsletter: http://www.solr-start.com/ and @solrstart
Solr popularizers community: https://www.linkedin.com/groups?gid=6713853
On Sun, Aug 10, 2014 at 1:51 PM, Christof Lorenz <lo...@web.de> wrote:
> Hi folks,
>
> i am searching for a way to update a certain column in the rdbms for
> each
> item as soon as the item was indexed by solr.
> The column will be the indicator in the delta-query to select un-indexed
> items.
> We don't want to use the timestamp based mechanism that is default.
>
> Any ideas how we could implement this ?
>
> Regards,
> Lochri
>
RE: SqlEntityProcessor
Posted by "Dyer, James" <Ja...@ingramcontent.com>.
I've heard of a user adding a separate <entity /> section to the end of their data-config.xml with a SqlEntityProcessor and an UPDATE statement. It would run after your main <entity /> section. I have not tried it myself, and surely DIH was not designed to do this, but it might work.
A better solution might be to write a class implementing EventListener that does the db update you want and put an "onImportEnd" listener in your configuration. See http://wiki.apache.org/solr/DataImportHandler#EventListeners for details.
James Dyer
Ingram Content Group
(615) 213-4311
-----Original Message-----
From: Christof Lorenz [mailto:lochri@web.de]
Sent: Sunday, August 10, 2014 6:52 AM
To: solr-user@lucene.apache.org
Subject: SqlEntityProcessor
Hi folks,
i am searching for a way to update a certain column in the rdbms for
each
item as soon as the item was indexed by solr.
The column will be the indicator in the delta-query to select un-indexed
items.
We don't want to use the timestamp based mechanism that is default.
Any ideas how we could implement this ?
Regards,
Lochri