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

Solr Join: Return Parent and Child Documents

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • 5.2, 6.0
    • search

    Description

      Solr JoinQParserPlugin returns only right side(parent) documents, it would be great if we can return all documents.

      User case:
      If JoinQParserPlugin can return all (parent and child) documents, client can group parent and child docs together with same group.field - (optionally) then use group.main=true to navigate them.

      The implementation in single mode:
      (as solr join doesn't support distributed search)

      req parameter:

      {!join from=man_id to=id includeParent=true}

      Add includeParent into org.apache.solr.search.JoinQuery
      Update JoinQuery's hashCode and equals to include includeParent.

      In org.apache.solr.search.JoinQuery.JoinQueryWeight.getDocSet()
      DocSet fromSet = fromSearcher.getDocSet(q);

      if (includeParent) {
      rstDocset = rstDocset.union(fromSet);
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            yuanyun.cn jefferyyuan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: