The other issue now is full-import is only importing 1 document, and
that's all.  Despite no limits etc... Odd...

On Wed, Apr 21, 2010 at 10:48 AM, Jason Rutherglen
<jason.rutherg...@gmail.com> wrote:
> I think it's working, it was the lack of the seemingly innocuous
> sub-entity pk="application_id".  After adding that I'm seeing some
> data returned.
>
> On Wed, Apr 21, 2010 at 10:44 AM, Jason Rutherglen
> <jason.rutherg...@gmail.com> wrote:
>> Something's off, for each row, it's performing the following 5
>> sub-queries.  Weird.  Below is the updated data-config.xml (compared
>> to the original email I changed the field from comment to added).
>>
>> <lst name="document#5">
>> <str>----------- row #1-------------</str>
>> <int name="id">876</int>
>> <date name="updated">2009-11-02T06:36:28Z</date>
>> <str>---------------------------------------------</str>
>> -
>> <lst name="entity:added">
>> <str name="query">SELECT added FROM ratings WHERE app = 876</str>
>> <str name="query">SELECT added FROM ratings WHERE app = 876</str>
>> <str name="query">SELECT added FROM ratings WHERE app = 876</str>
>> <str name="query">SELECT added FROM ratings WHERE app = 876</str>
>> <str name="query">SELECT added FROM ratings WHERE app = 876</str>
>> <str name="time-taken">0:0:0.0</str>
>> <str name="time-taken">0:0:0.0</str>
>> <str name="time-taken">0:0:0.0</str>
>> <str name="time-taken">0:0:0.0</str>
>> <str name="time-taken">0:0:0.0</str>
>> <str>----------- row #1-------------</str>
>> <date name="added">2010-01-26T18:08:53Z</date>
>> <str>---------------------------------------------</str>
>> <str>----------- row #2-------------</str>
>> <date name="added">2010-01-27T20:16:20Z</date>
>> <str>---------------------------------------------</str>
>> <str>----------- row #3-------------</str>
>> <date name="added">2010-01-29T00:02:40Z</date>
>> <str>---------------------------------------------</str>
>> <str>----------- row #4-------------</str>
>> <date name="added">2010-02-01T16:59:42Z</date>
>> <str>---------------------------------------------</str>
>> </lst>
>> </lst>
>>
>> <dataConfig>
>>  <dataSource type="JdbcDataSource" name="ch"
>> driver="com.mysql.jdbc.Driver" url="jdbc:mysql://127.0.0.1:3306/ch"
>> batchSize="-1" user="ch" password="ch_on_this"/>
>>  <document name="ch">
>>    <entity name="applications" pk="id" dataSource="ch"
>>      query="SELECT id, updated FROM applications limit 10">
>>      <entity name="comment" dataSource="ch" query="SELECT * FROM
>> ratings WHERE app = ${applications.id}">
>>        <field name="comment" column="comment"/>
>>        <field name="added" column="added"/>
>>      </entity>
>>    </entity>
>>  </document>
>> </dataConfig>
>>
>> On Wed, Apr 21, 2010 at 10:41 AM, caman <aboxfortheotherst...@gmail.com> 
>> wrote:
>>>
>>> Hard to tell.
>>>
>>>
>>>
>>> Did you try putting the child entity part of main query with subquery. Don't
>>> think that is the issue though but worth a try
>>>
>>> Select id, updated,( SELECT comment  FROM ratings WHERE app = appParent.id)
>>> as comment FROM applications appParent limit 10
>>>
>>>
>>>
>>>
>>>
>>> From: Jason Rutherglen [via Lucene]
>>> [mailto:ml-node+740680-1955771337-124...@n3.nabble.com]
>>> Sent: Wednesday, April 21, 2010 10:33 AM
>>> To: caman
>>> Subject: Re: Problem with DataImportHandler and embedded entities
>>>
>>>
>>>
>>> Caman,
>>>
>>> I'm storing it.  This is what I see when DataImportHandler verbose is turned
>>> on.
>>>
>>> While the field names don't match, I am seeing that sub-queries are
>>> being performed, data is being returned.  It's just not making it into
>>> the document.
>>>
>>> <lst name="verbose-output">
>>> -
>>> <lst name="entity:applications">
>>> -
>>> <lst name="document#1">
>>> <str name="query">SELECT id, updated FROM applications limit 10</str>
>>> <str name="time-taken">0:0:0.9</str>
>>> <str>----------- row #1-------------</str>
>>> <int name="id">407</int>
>>> <date name="updated">2009-11-02T06:35:48Z</date>
>>> <str>---------------------------------------------</str>
>>> -
>>> <lst name="entity:added">
>>> <str name="query">SELECT added FROM ratings WHERE app = 407</str>
>>> <str name="time-taken">0:0:0.8</str>
>>> </lst>
>>> </lst>
>>>
>>> On Wed, Apr 21, 2010 at 10:17 AM, caman <[hidden email]
>>> <http://n3.nabble.com/user/SendEmail.jtp?type=node&node=740680&i=0> > wrote:
>>>
>>>
>>>
>>>>
>>>> Are you storing the comment field or indexing it?
>>>>
>>>> <field  ..  Stored="false" ... >  will not appear in the document.
>>>>
>>>>
>>>>
>>>> From: Jason Rutherglen [via Lucene]
>>>> [mailto:[hidden email]
>>> <http://n3.nabble.com/user/SendEmail.jtp?type=node&node=740680&i=1> ]
>>>> Sent: Wednesday, April 21, 2010 10:15 AM
>>>> To: caman
>>>> Subject: Problem with DataImportHandler and embedded entities
>>>>
>>>>
>>>>
>>>> I'm using the following data-config.xml with DataImportHandler.  I've
>>>> never used embedded entities before however I'm not seeing the comment
>>>> show up in the document... I'm not sure what's up.
>>>>
>>>> <dataConfig>
>>>>  <dataSource type="JdbcDataSource" name="ch"
>>>> driver="com.mysql.jdbc.Driver" url="jdbc:mysql://127.0.0.1:3306/ch"
>>>> batchSize="-1" user="ch" password="ch_on_this"/>
>>>>  <document name="ch">
>>>>    <entity name="applications" pk="id" dataSource="ch"
>>>>      query="SELECT id, updated FROM applications limit 10">
>>>>      <entity name="comment" dataSource="ch" query="SELECT comment
>>>> FROM ratings WHERE app = ${applications.id}">
>>>>        <field name="comment" column="comment"/>
>>>>      </entity>
>>>>    </entity>
>>>>  </document>
>>>> </dataConfig>
>>>>
>>>>
>>>>
>>>>  _____
>>>>
>>>> View message @
>>>>
>>> http://n3.nabble.com/Problem-with-DataImportHandler-and-embedded-entities-tp
>>>> 740624p740624.html
>>>> To start a new topic under Solr - User, email
>>>> [hidden email]
>>> <http://n3.nabble.com/user/SendEmail.jtp?type=node&node=740680&i=2>
>>>> To unsubscribe from Solr - User, click
>>>> < (link removed)
>>>> yc3R1ZmZAZ21haWwuY29tfDQ3MjA2OHwtOTM0OTI1NzEx>  here.
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>> http://n3.nabble.com/Problem-with-DataImportHandler-and-embedded-entities-tp
>>> 740624p740634.html
>>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>>
>>>  _____
>>>
>>> View message @
>>> http://n3.nabble.com/Problem-with-DataImportHandler-and-embedded-entities-tp
>>> 740624p740680.html
>>> To start a new topic under Solr - User, email
>>> ml-node+472068-464289649-124...@n3.nabble.com
>>> To unsubscribe from Solr - User, click
>>> < (link removed)
>>> yc3R1ZmZAZ21haWwuY29tfDQ3MjA2OHwtOTM0OTI1NzEx>  here.
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context: 
>>> http://n3.nabble.com/Problem-with-DataImportHandler-and-embedded-entities-tp740624p740708.html
>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>
>>
>

Reply via email to