Or, in other words, assuming that the example you reported (article.id=18) returns a record with cat_name, could you hardcode that id in your dih-config (replacing ${article.id} with 18) and try to run a full-import?
Another important thing: in your example you are using the object_id as an int (object_id=18) but not in dih-config.xml where you are using quotes (object_id=' ${article.id}')....although jdbc drivers often handle this conversion magically this is not very good. Is object_id a string or a number? On 3 Jan 2014 18:53, "Andrea Gazzarini" <a.gazzar...@gmail.com> wrote: > Yes, that definitely matters...I was talking about a simple java class. > > Peter, sincerely? I don't know. > > Are you sure you are doing then same queries with the same article.id as > solr does? and sorry for the stupid question but are you sure that for > those article ids the cat_name is not null? > On 3 Jan 2014 18:37, "PeterKerk" <vettepa...@hotmail.com> wrote: > >> But when I execute the query directly on MySQL I do get a cat_name column >> in >> there: >> >> select wt.name as >> cat_name,wt.slug,wtr.term_taxonomy_id,wtt.term_id,wtt.taxonomy from >> wp_term_relationships wtr >> INNER JOIN wp_term_taxonomy wtt ON >> wtt.term_taxonomy_id=wtr.term_taxonomy_id >> AND wtt.taxonomy='category' >> INNER JOIN wp_terms wt ON wt.term_id=wtt.term_taxonomy_id >> where wtr.object_id=18 >> >> I see no reason why my configuration in my data-config.xml would not >> execute >> successfully: >> >> <entity name="post_categories" query="select wt.name as >> cat_name,wt.slug,wtr.term_taxonomy_id,wtt.term_id,wtt.taxonomy from >> wp_term_relationships wtr >> INNER JOIN wp_term_taxonomy wtt ON >> wtt.term_taxonomy_id=wtr.term_taxonomy_id >> AND wtt.taxonomy='category' >> INNER JOIN wp_terms wt ON wt.term_id=wtt.term_taxonomy_id >> where wtr.object_id='${article.id}';"> >> >> >> </entity> >> >> >> I have no transformers on my resultset (I checked my querystring, >> schema.xml >> and data-config.xml, since I'm not even sure where it would have to be >> defined). >> >> >> >> Andrea Gazzarini-4 wrote >> > You can debug the resultset in a main class by doing rs.getString >> > ("cat_name") >> >> What do you mean by 'in a main class'? Where can I define that? (ps. I'm >> working with ASP.NET if that matters) >> >> Thanks again! :) >> >> >> >> -- >> View this message in context: >> http://lucene.472066.n3.nabble.com/Empty-facets-on-Solr-with-MySQL-tp4109170p4109388.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >