On Jun 18, 2009, at 4:51 AM, Noble Paul നോബിള്
नोब्ळ् wrote:
apparently the row return a null 'board_id'
No. I'm working with a test database situation with a single record,
and I simply do a full-import, then change the deleted column to 'Y'
and try a delta-import. The deletedPkQuery returns a single result in
that case, and the NPE came from when I made the query return board-1
instead of just 1.
your stacktrace sugggests this. even if it is fixed I guess it may not
work because your are storing the id as
board-${test.board_id}
and unless your query returns something like board-<some-id> it may
not work for you.
Anyway i shall put in a fix ion DIH to avoid this NPE
That fix didn't solve the NPE. I still get the following stacktrace
when I have deletedPkQuery="select concat('board-',board_id) from
boards where deleted = 'Y'". I presume it's looking for the pk
column (board_id in my case) in the results of the deletedPkQuery.
SEVERE: Delta Import Failed
java.lang.NullPointerException
at
org
.apache.solr.handler.dataimport.SolrWriter.deleteDoc(SolrWriter.java:83)
at
org
.apache.solr.handler.dataimport.DocBuilder.deleteAll(DocBuilder.java:
289)
at
org.apache.solr.handler.dataimport.DocBuilder.doDelta(DocBuilder.java:
247)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:
159)
at
org
.apache
.solr.handler.dataimport.DataImporter.doDeltaImport(DataImporter.java:
337)
I changed to deletedPkQuery="select concat('board-',board_id) as
board_id from boards where deleted = 'Y'" and got no NPE, but I also
still haven't been able to get DIH to properly remove Solr documents
that have been flagged as deleted in the database.
Erik