You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Gunnlaugur Thor Briem (JIRA)" <ji...@apache.org> on 2014/02/07 13:55:21 UTC

[jira] [Comment Edited] (SOLR-5217) CachedSqlEntity fails with stored procedure

    [ 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:54 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.


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 actually appears 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