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

Add Joins to the Streaming API and Streaming Expressions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Implemented
    • None
    • 6.0
    • SolrJ

    Description

      Add InnerJoinStream, LeftOuterJoinStream, and supporting classes to the Streaming API to allow for joining between sub-streams.

      At its basic, it would look something like this

      innerJoin(
        search(collection1, q=*:*, fl="fieldA, fieldB, fieldC", ...),
        search(collection2, q=*:*, fl="fieldA, fieldD, fieldE", ...),
        on="fieldA=fieldA"
      )
      

      or with multi-field on clauses

      innerJoin(
        search(collection1, q=*:*, fl="fieldA, fieldB, fieldC", ...),
        search(collection2, q=*:*, fl="fieldA, fieldD, fieldE", ...),
        on="fieldA=fieldA, fieldB=fieldD"
      )
      

      I'd also like to support the option of doing a hash join instead of the default merge join but I haven't yet figured out the best way to express that. I'd like to let the user tell us which sub-stream should be hashed (the least-cost one).

      Also, I've been thinking about field aliasing and might want to add a SelectStream which serves the purpose of allowing us to limit the fields coming out and rename fields.

      Depends on SOLR-7554

      Attachments

        1. SOLR-7584.patch
          55 kB
          Dennis Gove
        2. SOLR-7584.patch
          54 kB
          Dennis Gove
        3. SOLR-7584.patch
          50 kB
          Dennis Gove
        4. SOLR-7584.patch
          51 kB
          Dennis Gove
        5. SOLR-7584.patch
          51 kB
          Dennis Gove
        6. SOLR-7584.patch
          41 kB
          Dennis Gove

        Issue Links

          Activity

            People

              dpgove Dennis Gove
              dpgove Dennis Gove
              Votes:
              4 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: