Yes, that's the point Steve.

In a full-import from the UI of Solr a select defined in configuration file
data-config.xml is executed.
This select retrieves the fields indexed as defined in this config file and
schema.xml.

But what I try to do is to execute this select and update a field of one of
the tables used in the select.

I tried to change the "select" with a "merge", but Oracle can't return
values in a merge so... the select is working, if I try to do " merge into
tablename t (the select) e on ( e.ID = t.ID) when matched then
    update set t.timestamp = systimestamp it works (the update) but I don’t
get the data, if I add to this sql, returning e.* I get an error because
returning is not available in Oracle.

So I've a complex select in data-config.xml that works, I can change it with
an update that work but only the update, so I'll not retrieve any data in
the full-import.

So I've no solution at the moment on how to make the select on the database
and then update a value of one of the tables used into this select.

I've tried with UPDATE and not with MERGE but then I got another Oracle
error.

My sql knowledge is limited and I ask in this list searching perhaps for
another kind of solution or idea perhaps into solr config, options etc...


Regards.

-----Mensaje original-----
De: steve [mailto:sc_shep...@hotmail.com]
Enviado el: martes, 17 de marzo de 2015 10:02
Para: solr-user@lucene.apache.org
Asunto: RE: Select and Update after with DataImportHandler

Hi, maybe I'm missing the point here, but there could be a separate
table/database that has a record inserted after the full import is
completed; this could be part of the same "batch" or script file, or one
that is "chained" after the original query completes.

> From: g...@idieikon.com
> To: solr-user@lucene.apache.org
> Subject: Select and Update after with DataImportHandler
> Date: Tue, 17 Mar 2015 09:47:25 +0100
>
> Hello, we have a sql to retrieve fields from DB and they are indexed in a
full-import defined in a data-config.xml.
>
> It works as expected but now we want to update the database fields so we
know when data was imported.
> So we add to the table being indexed a timestamp. Now we have table1
field1 field2... and fieldN (the timestamp).
>
> Is there any way to indicate "after you finish the select of the
full-import, now you have to do this sql update of the timestamp in the
database table"?
>
> We use Solr 4.6.0
>
>
> We've tried in the same sql, with cursors or transactions, etc, but the
sql select is pretty complex and we can't make it work in such way, but
perhaps the only way to do it is to substitute the select with some kind of
transaction but we don’t know if this is possible to do in the query for the
full-import.
>
> Regards.
>
>
> ---
> El software de antivirus Avast ha analizado este correo electrónico en
busca de virus.
> http://www.avast.com
>
>



---
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
http://www.avast.com


Reply via email to