Uploaded image for project: 'Spring Data for Apache Solr'
  1. Spring Data for Apache Solr
  2. DATASOLR-394

SolrJConverter ignores childDocuments when indexing

    XMLWordPrintable

    Details

    • Sprint:
      Kay RC1

      Description

      Because MappingSolrConverter does not support childDocuments, I am using SolrJConverter.

      Converting from domain objects to SolrInputDocument is done right, but in SolrJConverter.write method the childDocuments are not transfered to "sink", therefore they are ignored.

      I managed to workaround it overriding this method and adding:

      if (sink instanceof SolrInputDocument) {
          SolrInputDocument parent = (SolrInputDocument) sink;
      
          List<SolrInputDocument> childDocuments = convertedDocument.getChildDocuments();
      
          if (childDocuments != null) {
              parent.addChildDocuments(childDocuments);
          }
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cstrobl Christoph Strobl
              Reporter:
              zamborsky@gmail.com Matus Zamborsky
              Last updater:
              Oliver Drotbohm
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: