Hi,

It looks like the deltaImportQuery needs to be changed you are using
dataimporter.delta.id which is not correct, you are selecting objected in
the deltaQuery, so the deltaImportQuery should be using
dataimporter.delta.objectid

So try this:

<entity name="test" pk="objectid"
        query="select * from table"
        deltaImportQuery="select * from table where
objectid='${dataimporter.delta.objectid}'"
        deltaQuery="select objectid from table where lastupdate >
'${dataimporter.last_index_time}'">
</entity>

Colin.

> -----Original Message-----
> From: safl [mailto:s...@salamin.net]
> Sent: Wednesday, April 28, 2010 3:05 PM
> To: solr-user@lucene.apache.org
> Subject: Problem with DIH delta-import on JDBC
> 
> 
> Hello,
> 
> I'm just new on the list.
> I searched a lot on the list, but I didn't find an answer to my
> question.
> 
> I'm using Solr 1.4 on Windows with an Oracle 10g database.
> I am able to do full-import without any problem, but I'm not able to
> get
> delta-import working.
> 
> I have the following in the data-config.xml:
> 
> ...
> <entity name="test" pk="objectid"
>         query="select * from table"
>         deltaImportQuery="select * from table where
> objectid='${dataimporter.delta.id}'"
>         deltaQuery="select objectid from table where lastupdate >
> '${dataimporter.last_index_time}'">
> </entity>
> ...
> 
> I update some records in the table and the try to run a delta-import.
> I track the SQL queries on DB with P6Spy, and I always see a query like
> 
> select * from table where objectid=''
> 
> Of course, with such an SQL query, nothing is updated in my index.
> 
> It behave the same if I replace ${dataimporter.delta.id} by
> ${dataimporter.delta.objectid}.
> Can someone tell what is wrong with it?
> 
> Thanks a lot,
>  Florian
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Problem-with-DIH-delta-import-on-
> JDBC-tp763469p763469.html
> Sent from the Solr - User mailing list archive at Nabble.com.



Reply via email to