That would be a worthy enhancement to do.  Always nice to give the user a 
warning when something is going to fail so they can troubleshoot better...

James Dyer
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: Stefan Matheis [mailto:matheis.ste...@gmail.com] 
Sent: Wednesday, May 22, 2013 10:30 AM
To: solr-user@lucene.apache.org
Subject: Re: How do I use CachedSqlEntityProcessor?

> I am curious why I did not get any errors before.
Because there was no (syntax) error before - the fact that you didn't include a 
SKU (but using it as cacheKey) just doesn't match anything .. therefore you got 
nothing added to your documents.

Perhaps we should add an ticket as improvement for that, to issue a 
notice/warning if the result set itself doesn't contain the cacheKey? WDYT 
James?

Stefan 


On Wednesday, May 22, 2013 at 5:14 PM, O. Olson wrote:

> Thank you very much James. Your suggestion worked exactly! I am curious why I
> did not get any errors before. For others, the following worked for me: 
> 
> <entity name="Cat1" 
> query="SELECT CategoryName, SKU from CAT_TABLE WHERE
> CategoryLevel=1" cacheKey="SKU" cacheLookup="Product.SKU"
> processor="CachedSqlEntityProcessor">
> <field column="CategoryName" name="Category1" /> 
> </entity>
> 
> Similarly for other Categories i.e. Category2, Category3, etc. 
> 
> I am now going to try this for a larger dataset. I hope this works.
> O.O.
> 
> 
> Dyer, James-2 wrote
> > There was a mistake in my last reply. Your child entities need to SELECT
> > on the join key so DIH has it to do the join. So use "SELECT SKU,
> > CategoryName..."
> > 
> > James Dyer
> > Ingram Content Group
> > (615) 213-4311
> > 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/How-do-I-use-CachedSqlEntityProcessor-tp4064919p4065342.html
> Sent from the Solr - User mailing list archive at Nabble.com 
> (http://Nabble.com).
> 
> 

Reply via email to