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

[subquery] calls another collection fails with "undefined field" or NPE from mergeIds

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Workaround
    • Affects Version/s: 6.1, 6.2
    • Fix Version/s: 6.4, 7.0
    • Component/s: SolrCloud
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      If subquery collection has a different unique key field name (let's say foo_id is different to id in primary collection), you've got NullPoniterException from QueryComponent.mergeIds(). To accommodate the difference between uniqueKey field names between collections, add the following parameters foo.fl=id:foo_id&foo.distrib.singlePass=true. The former one renames uniqueKey field, the later switches to single pass search. There is no way to rename field in default processing.
      In a rare case when a collection under subquery has no unqueKey at all, it leads to something like "undefined field", but it's not going to work anyway.

        Attachments

        1. SOLR-9448.patch
          7 kB
          Mikhail Khludnev
        2. SOLR-9448.patch
          4 kB
          Mikhail Khludnev
        3. SOLR-9448.patch
          15 kB
          Mikhail Khludnev
        4. SOLR-9448.patch
          14 kB
          Mikhail Khludnev

          Issue Links

            Activity

              People

              • Assignee:
                mkhludnev Mikhail Khludnev
                Reporter:
                mkhludnev Mikhail Khludnev
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: