[ 
https://issues.apache.org/jira/browse/SOLR-5147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14118098#comment-14118098
 ] 

Thomas Champagne edited comment on SOLR-5147 at 9/4/14 12:40 PM:
-----------------------------------------------------------------

I have updated the patch.  There were only problems in the new unit test 
TestHierarchicalDocBuilder : 
* adding the field _root_ in the dataimport schema.
* the parent filter for the query is now a FixedBitSetCachingWrapperFilter.

You can apply this patch in the trunk. 

All unit tests about dih are OK after applying the patch.

If you want to test, you can add an attribute child at true in the entity tag 
in the data config file. The entities taggued with child will be added with the 
addChildDocument method.
For example :
{code:xml}
<dataConfig>
  <dataSource type="JdbcDataSource" />
  <document>
    <entity name="PARENT" query="select * from PARENT">
      <field column="id" />
      <field column="desc" />
      <field column="type_s" />
      <entity child="true" name="CHILD" query="select * from CHILD where 
parent_id='${PARENT.id}'">
        <field column="id" />
        <field column="desc" />
        <field column="type_s" />
      </entity>
    </entity>
  </document>
</dataConfig>
{code}


was (Author: lafeuil):
I have updated the patch.  There were only problems in the new unit test 
TestHierarchicalDocBuilder : 
* adding the field _root_ in the dataimport schema.
* the parent filter for the query is now a FixedBitSetCachingWrapperFilter.

You can apply this patch in the trunk. 

All unit tests about dih are OK after applying the patch.

If you want to test, you can add an attribute child at true in the entity tag 
in the data config file. The entities taggued with child will be added with the 
addChildDocument method.
For example :
{code:xml}
<dataConfig>
  <dataSource type="JdbcDataSource" />
  <document>
    <entity name="PARENT' query="select * from PARENT">
      <field column="id" />
      <field column="desc" />
      <field column="type_s" />
      <entity child="true" name="CHILD" query="select * from CHILD where 
parent_id='${PARENT.id}'">
        <field column="id" />
        <field column="desc" />
        <field column="type_s" />
      </entity>
    </entity>
  </document>
</dataConfig>
{code}

> Support Block Join documents in DIH
> -----------------------------------
>
>                 Key: SOLR-5147
>                 URL: https://issues.apache.org/jira/browse/SOLR-5147
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Vadim Kirilchuk
>             Fix For: 4.9, 5.0
>
>         Attachments: SOLR-5147.patch
>
>
> DIH should be able to index hierarchical documents, i.e. it should be able to 
> work with SolrInputDocuments#addChildDocument.
> There was patch in SOLR-3076: 
> https://issues.apache.org/jira/secure/attachment/12576960/dih-3076.patch
> But it is not uptodate and far from being complete.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to