lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gunnlaugur Thor Briem (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (SOLR-5217) CachedSqlEntity fails with stored procedure
Date Fri, 07 Feb 2014 12:57:22 GMT

    [ https://issues.apache.org/jira/browse/SOLR-5217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13894473#comment-13894473
] 

Gunnlaugur Thor Briem edited comment on SOLR-5217 at 2/7/14 12:56 PM:
----------------------------------------------------------------------

That error is {{CachedSqlEntityProcessor}} borking on looking up null as a key, and it causes
processing of the document to be aborted altogether.

You can work around it by changing your {{document}} query (the {{getAllRevDetPlatWideSearch}}
thing) to never output a {{NULL folder_id}}; e.g. output {{COALESCE(folder_id, -1)}} instead
of {{folder_id}} (assuming {{-1}} will not appear as an actual folder ID in the {{folderadmin_list}}
query).

I think it's a valid bug, though. {{CachedSqlEntityProcessor}} should not fail so drastically
on a {{null}} key; either it should simply not match on {{null}} (treating it as any other
unmapped key) or it should support it like any other key, if it does appear as a key in the
cached query.

I suggest changing the issue title to “CachedSqlEntity fails looking up null as a key, aborting
document update”


was (Author: gthb):
That error is {{CachedSqlEntityProcessor}} borking on looking up null as a key, and it causes
processing of the document to be aborted altogether.

You can work around it by changing your {{document}} query (the {{getAllRevDetPlatWideSearch}}
thing) to never output a {{NULL folder_id}}; e.g. output {{COALESCE(folder_id, -1)}} instead
of {{folder_id}} (assuming {{-1}} will not appear as an actual folder ID in the {{folderadmin_list}}
query).

I think it's a valid bug, though. {{CachedSqlEntityProcessor}} should not fail so drastically
on a {{null}} key; either it should simply not match on {{null}} (treating it as any other
unmapped key) or it should support it like any other key, if it does appear as a key in the
cached query.

> CachedSqlEntity fails with stored procedure
> -------------------------------------------
>
>                 Key: SOLR-5217
>                 URL: https://issues.apache.org/jira/browse/SOLR-5217
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>            Reporter: Hardik Upadhyay
>         Attachments: db-data-config.xml
>
>
> When using DIH with CachedSqlEntityProcessor and importing data from MS-sql using stored
procedures, it imports data for nested entities only once and then every call with different
arguments for nested entities are only served from cache.My db-data-config is attached.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message