[ 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to