Solr: Indexing nested Documents via DIH

自闭症网瘾萝莉.ら 提交于 2019-12-04 20:13:52

This feature has been implemented by SOLR-5147 and should be available for Solr 5.1+

Here is a sample configuration taken from the original Jira ticket.

<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>

note the child="true" is required for child entities.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!