You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Shawn Heisey <so...@elyograg.org> on 2010/06/28 23:22:51 UTC

DIH and denormalizing

I am trying to do some denormalizing with DIH from a MySQL source.  
Here's part of my data-config.xml:

<entity name="dataTable" pk="did"
       query="SELECT *,FROM_UNIXTIME(post_date) as pd FROM ncdat WHERE 
did &gt; ${dataimporter.request.minDid} AND did &lt;= 
${dataimporter.request.maxDid} AND (did % 
${dataimporter.request.numShards}) IN (${dataimporter.request.modVal})">
<entity name="ncdat_wt"
         query="SELECT webtable as wt FROM ncdat_wt WHERE 
featurecode='${ncdat.feature}'">
</entity>
</entity>

The relationship between features in ncdat and webtable in ncdat_wt (via 
featurecode) will be many-many.  The "wt" field in schema.xml is set up 
as multivalued.

It seems that ${ncdat.feature} is not being set.  I saw a query 
happening on the server and it was "SELECT webtable as wt FROM ncdat_wt 
WHERE featurecode=''" - that last part is an empty string with single 
quotes around it.  From what I can tell, there are no entries in ncdat 
where feature is blank.  I've tried this with both a 1.5-dev checked out 
months ago (which we are using in production) and a 3.1-dev checked out 
today.

Am I doing something wrong?

Thanks,
Shawn


Re: DIH and denormalizing

Posted by Shawn Heisey <so...@elyograg.org>.
On 6/28/2010 3:28 PM, caman wrote:
> In your query 'query="SELECT webtable as wt FROM ncdat_wt WHERE
> featurecode='${ncdat.feature}'  .. instead of ${ncdat.feature} use
> ${dataTable.feature}  where dataTable is your parent entity name.
>    

I knew it would be something stupid like that.  I thought I changed 
everything, looks like I forgot one.  Thank you!  From what I can tell 
now, it's working.  Sure is a lot slower now that it's got to do another 
query for every item.

Shawn


RE: DIH and denormalizing

Posted by caman <ab...@gmail.com>.
In your query 'query="SELECT webtable as wt FROM ncdat_wt WHERE 
featurecode='${ncdat.feature}'  .. instead of ${ncdat.feature} use
${dataTable.feature}  where dataTable is your parent entity name.

 

 

 

From: Shawn Heisey-4 [via Lucene]
[mailto:ml-node+929151-1527242139-124354@n3.nabble.com] 
Sent: Monday, June 28, 2010 2:24 PM
To: caman
Subject: DIH and denormalizing

 

I am trying to do some denormalizing with DIH from a MySQL source.   
Here's part of my data-config.xml: 

<entity name="dataTable" pk="did" 
       query="SELECT *,FROM_UNIXTIME(post_date) as pd FROM ncdat WHERE 
did > ${dataimporter.request.minDid} AND did <= 
${dataimporter.request.maxDid} AND (did % 
${dataimporter.request.numShards}) IN (${dataimporter.request.modVal})"> 
<entity name="ncdat_wt" 
         query="SELECT webtable as wt FROM ncdat_wt WHERE 
featurecode='${ncdat.feature}'"> 
</entity> 
</entity> 

The relationship between features in ncdat and webtable in ncdat_wt (via 
featurecode) will be many-many.  The "wt" field in schema.xml is set up 
as multivalued. 

It seems that ${ncdat.feature} is not being set.  I saw a query 
happening on the server and it was "SELECT webtable as wt FROM ncdat_wt 
WHERE featurecode=''" - that last part is an empty string with single 
quotes around it.  From what I can tell, there are no entries in ncdat 
where feature is blank.  I've tried this with both a 1.5-dev checked out 
months ago (which we are using in production) and a 3.1-dev checked out 
today. 

Am I doing something wrong? 

Thanks, 
Shawn 




  _____  

View message @
http://lucene.472066.n3.nabble.com/DIH-and-denormalizing-tp929151p929151.htm
l 
To start a new topic under Solr - User, email
ml-node+472068-464289649-124354@n3.nabble.com 
To unsubscribe from Solr - User, click
< (link removed) 
GZvcnRoZW90aGVyc3R1ZmZAZ21haWwuY29tfDQ3MjA2OHwtOTM0OTI1NzEx>  here. 

 


-- 
View this message in context: http://lucene.472066.n3.nabble.com/DIH-and-denormalizing-tp929151p929168.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: DIH and denormalizing

Posted by Alexey Serba <as...@gmail.com>.
> It seems that ${ncdat.feature} is not being set.
Try ${dataTable.feature} instead.


On Tue, Jun 29, 2010 at 1:22 AM, Shawn Heisey <so...@elyograg.org> wrote:
> I am trying to do some denormalizing with DIH from a MySQL source.  Here's
> part of my data-config.xml:
>
> <entity name="dataTable" pk="did"
>      query="SELECT *,FROM_UNIXTIME(post_date) as pd FROM ncdat WHERE did
> &gt; ${dataimporter.request.minDid} AND did &lt;=
> ${dataimporter.request.maxDid} AND (did % ${dataimporter.request.numShards})
> IN (${dataimporter.request.modVal})">
> <entity name="ncdat_wt"
>        query="SELECT webtable as wt FROM ncdat_wt WHERE
> featurecode='${ncdat.feature}'">
> </entity>
> </entity>
>
> The relationship between features in ncdat and webtable in ncdat_wt (via
> featurecode) will be many-many.  The "wt" field in schema.xml is set up as
> multivalued.
>
> It seems that ${ncdat.feature} is not being set.  I saw a query happening on
> the server and it was "SELECT webtable as wt FROM ncdat_wt WHERE
> featurecode=''" - that last part is an empty string with single quotes
> around it.  From what I can tell, there are no entries in ncdat where
> feature is blank.  I've tried this with both a 1.5-dev checked out months
> ago (which we are using in production) and a 3.1-dev checked out today.
>
> Am I doing something wrong?
>
> Thanks,
> Shawn
>
>