cacheKey and cacheLookup are required attributes .

On Thu, Jan 28, 2010 at 12:51 AM, KirstyS <kirst...@gmail.com> wrote:
>
> Thanks. I am on 1.4..so maybe that is the problem.
> Will try when I get back to work tomorrow.
> Thanks
>
>
> Rolf Johansson-2 wrote:
>>
>> I recently had issues with CachedSqlEntityProcessor too, figuring out how
>> to
>> use the syntax. After a while, I managed to get it working with cacheKey
>> and
>> cacheLookup. I think this is 1.4 specific though.
>>
>> It seems you have double WHERE clauses, one in the query and one in the
>> where attribute.
>>
>> Try using cacheKey and cacheLookup instead in something like this:
>>
>> <entity name="LinkedCategory" pk="LinkedCatArticleId"
>>         query="SELECT LinkedCategoryBC, CmsArticleId as LinkedCatAricleId
>>                FROM LinkedCategoryBreadCrumb_SolrSearch (nolock)"
>>         processor="CachedSqlEntityProcessor"
>>         cacheKey="LINKEDCATARTICLEID"
>>         cacheLookup="article.CMSARTICLEID"
>>         deltaQuery="SELECT LinkedCategoryBC
>>                     FROM LinkedCategoryBreadCrumb_SolrSearch (nolock)
>>                     WHERE convert(varchar(50), LastUpdateDate) >
>>                     '${dataimporter.article.last_index_time}'
>>                     OR convert(varchar(50), PublishDate) >
>>                     '${dataimporter.article.last_index_time}'"
>>         parentDeltaQuery="SELECT * from vArticleSummaryDetail_SolrSearch
>>                          (nolock)">
>>     <field column="LinkedCategoryBC" name="LinkedCategoryBreadCrumb"/>
>> </entity>
>>
>> /Rolf
>>
>>
>> Den 2010-01-27 12.36, skrev "KirstyS" <kirst...@gmail.com>:
>>
>>>
>>> Hi, I have looked on the wiki. Using the CachedSqlEntityProcessor looks
>>> like
>>> it was simple. But I am getting no speed benefit and am not sure if I
>>> have
>>> even got the syntax correct.
>>> I have a main root entity called 'article'.
>>>
>>> And then I have a number of sub entities. One such entity is as such :
>>>
>>>     <entity name="LinkedCategory" pk="LinkedCatAricleId"
>>>               query="SELECT LinkedCategoryBC, CmsArticleId as
>>> LinkedCatAricleId
>>>                      FROM LinkedCategoryBreadCrumb_SolrSearch (nolock)
>>>                      WHERE convert(varchar(50), CmsArticleId) =
>>> convert(varchar(50), '${article.CmsArticleId}') "
>>>                 processor="CachedSqlEntityProcessor"
>>>                 WHERE="LinkedCatArticleId = article.CmsArticleId"
>>>                 deltaQuery="SELECT LinkedCategoryBC
>>>                             FROM LinkedCategoryBreadCrumb_SolrSearch
>>> (nolock)
>>>                             WHERE convert(varchar(50), CmsArticleId) =
>>> convert(varchar(50), '${article.CmsArticleId}')
>>>                             AND (convert(varchar(50), LastUpdateDate) >
>>> '${dataimporter.article.last_index_time}'
>>>                             OR   convert(varchar(50), PublishDate) >
>>> '${dataimporter.article.last_index_time}')"
>>>                 parentDeltaQuery="SELECT * from
>>> vArticleSummaryDetail_SolrSearch (nolock)
>>>                                  WHERE convert(varchar(50), CmsArticleId)
>>> =
>>> convert(varchar(50), '${article.CmsArticleId}')">
>>>         <field column="LinkedCategoryBC"
>>> name="LinkedCategoryBreadCrumb"/>
>>>       </entity>
>>>
>>>
>>> As you can see I have added (for the main query - not worrying about the
>>> delta queries yet!!) the processor and the 'where' but not sure if it's
>>> correct.
>>> Can anyone point me in the right direction???
>>> Thanks
>>> Kirsty
>>
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/Help-using-CachedSqlEntityProcessor-tp27337635p27345412.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>



-- 
-----------------------------------------------------
Noble Paul | Systems Architect| AOL | http://aol.com

Reply via email to