You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "James Dyer (JIRA)" <ji...@apache.org> on 2013/03/15 18:02:14 UTC

[jira] [Resolved] (SOLR-4561) CachedSqlEntityProcessor with parametarized query is broken

     [ https://issues.apache.org/jira/browse/SOLR-4561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Dyer resolved SOLR-4561.
------------------------------

    Resolution: Duplicate

This is the same as SOLR-3857.
                
> CachedSqlEntityProcessor with parametarized query is broken
> -----------------------------------------------------------
>
>                 Key: SOLR-4561
>                 URL: https://issues.apache.org/jira/browse/SOLR-4561
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 4.1
>            Reporter: Sudheer Prem
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> When child entities are created and the child entity is provided with a parametrized query as below, 
> {code:xml} 
> <entity name="x" query="select * from x">
>     <entity name="y" query="select * from y where xid=${x.id}" processor="CachedSqlEntityProcessor">
>     </entity>
> <entity>
> {code} 
> the Entity Processor always return the result from the fist query even though the parameter is changed, It is happening because, EntityProcessorBase.getNext() method doesn't reset the query and rowIterator after calling DIHCacheSupport.getCacheData() method.
> This can be fixed by changing the else block in getNext() method of EntityProcessorBase from
> {code} 
> else  {
>       return cacheSupport.getCacheData(context, query, rowIterator);
>       
> }
> {code} 
> to the code mentioned below:
> {code} 
> else  {
>       Map<String,Object> cacheData = cacheSupport.getCacheData(context, query, rowIterator);
>       query = null;
>       rowIterator = null;
>       return cacheData;
>     }
> {code}   
> Update: But then, the caching doesn't seem to be working...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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