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

Delta indexing with child documents with help of cacheImpl="SortedMapBackedCache"

    XMLWordPrintableJSON

Details

    Description

      Hi,

      I am using solr DIH for indexing the Parent-Child relation data and using cacheImpl="SortedMapBackedCache".
      For Full data indexinf I am using command clean="true" and for delta I am using command full-import and clean="false".
      So the same queries are being executed for fulland delta and indexing working properly.
      The issue which we are facing is where for a perticuler parent document, there not a single child document and we are adding new child document.
      Following are the steps to reproduce the issue.

      1. Add Child document to an existing parent document which is not having empty child document.
      2. Once the child document is added with delta indexing, try to modify the parent document and run delta indexing again
      3. After the delta indexing is completed, I can see the modified child documents showing in Solr DIH page in debug mode. But the it is not getting updated in Solr collection.

      I am using data config as below as below.

      <document name="User">
      <entity name="Parent" dataSource="DS1" pk="id" query="[SP_GetData] '${dih.last_index_time}','${dataimporter.request.clean}'">
      <field column="id" name="id"/>
      <field column="FirstName" name="FirstName"/>
      <field column="LastName" name="LastName"/>
      <entity name="R" dataSource="DS1" query="[SP_GetDataRTest] '${dih.last_index_time}','${dataimporter.request.clean}'"
      cacheKey="id" cacheLookup="Parent.id" processor="SqlEntityProcessor" cacheImpl="SortedMapBackedCache">
      <field column="RID" name="RID"/>
      <field column="RNAME" name="RID"/>
      </entity>
      <entity name="P" dataSource="DS2" query="[SP_GetDataTest] '${dih.last_index_time}','${dataimporter.request.clean}'"
      cacheKey="PID" cacheLookup="Parent.id" processor="SqlEntityProcessor" cacheImpl="SortedMapBackedCache" child="true">
      <field column="id" name="id"/>
      <field column="PNAME" name="PNAME"/>
      </entity>
      </entity>
      </document>

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aniketishere@gmail.com Aniket Khare
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: