Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-2252

when child entity is the root in nested entities, delta-import doesn't work

    Details

      Description

      sample data-config.xml:

      <dataConfig>
        <dataSource driver="org.postgresql.Driver"
                    url="jdbc:postgresql://localhost/exercise" user="solr" password="solr" />
        <document>
          <entity name="team" query="select * from team" pk="team_id" rootEntity="false"
                  deltaQuery="select team_id from team where last_modified > '${dih.last_index_time}'"
                  deltaImportQuery="select * from team where team_id='${dih.delta.team_id}'">
            <field column="team_name" name="team"/>
            <field column="team_yard" name="yard"/>
            <entity name="team_athlete" pk="team_id" rootEntity="false"
                    query="select athlete_id from team_athlete where team_athlete.team_id=${team.team_id}"
                    deltaQuery="select distinct team_id from team_athlete where last_modified > '${dih.last_index_time}'"
                    deltaImportQuery="select athlete_id from team_athlete where team_athlete.team_id=${dih.delta.team_id}"
                    parentDeltaQuery="select team_id from team where team_id=${team_athlete.team_id}">
              <entity name="athlete" pk="athlete_id" rootEntity="true"
                      query="select athlete_name from athlete where athlete_delflag='N' AND athlete.athlete_id=${team_athlete.athlete_id}"
                      deletedPkQuery="select athlete_id from athlete where athlete_delflag='Y' AND last_modified > '${dih.last_index_time}'"
                      deltaQuery="select athlete_id from athlete where athlete_delflag='N' AND  last_modified > '${dih.last_index_time}'"
                      deltaImportQuery="select athlete_name from athlete where athlete_delflag='N' AND athlete.athlete_id=${dih.delta.athlete_id}"
                      parentDeltaQuery="select team_id from team_athlete where athlete_id=${athlete.athlete_id}">
                <field column="athlete_name" name="name"/>
              </entity>
            </entity>
          </entity>
        </document>
      </dataConfig>
      

        Attachments

        1. SOLR-2252.patch
          17 kB
          Koji Sekiguchi
        2. SOLR-2252.patch
          2 kB
          Koji Sekiguchi

          Activity

            People

            • Assignee:
              koji Koji Sekiguchi
              Reporter:
              koji Koji Sekiguchi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: