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>
      
      1. SOLR-2252.patch
        17 kB
        Koji Sekiguchi
      2. SOLR-2252.patch
        2 kB
        Koji Sekiguchi

        Activity

        Hide
        Koji Sekiguchi added a comment -

        I added tests. All tests pass.
        I'll commit in a few days if no one objects.

        Show
        Koji Sekiguchi added a comment - I added tests. All tests pass. I'll commit in a few days if no one objects.
        Hide
        Koji Sekiguchi added a comment -

        trunk: Committed revision 1040608.
        branch_3x: Committed revision 1040629.

        Show
        Koji Sekiguchi added a comment - trunk: Committed revision 1040608. branch_3x: Committed revision 1040629.
        Hide
        Grant Ingersoll added a comment -

        Bulk close for 3.1.0 release

        Show
        Grant Ingersoll added a comment - Bulk close for 3.1.0 release

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development