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

{!join score=.. fromIndex=..} throws "undefined field" for numeric field if from and to schemas are different

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.3
    • Fix Version/s: 6.4
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      numeric "from" field is mistakenly looked in "to" schema. see org.apache.solr.search.join.ScoreJoinQParserPlugin.....parse()

             private Query createQuery(final String fromField, final String fromQueryStr,
                                       String fromIndex, final String toField, final ScoreMode scoreMode,
                                       boolean byPassShortCircutCheck) throws SyntaxError {
      +        FieldType.LegacyNumericType fromNumericType = req.getSchema().getField(fromField).getType().getNumericType();
      +        FieldType.LegacyNumericType toNumericType = req.getSchema().getField(toField).getType().getNumericType();
      

      it's in branch_6x only. Users who are faced this are advised to just declare "from" field in "to" schema. It should work. Take care.

      one line fix and improvements for TestCrossCoreJoin.java are quite welcome.

      1. SOLR-9620.patch
        17 kB
        Mikhail Khludnev

        Issue Links

          Activity

          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 6168a5d63e43efd4d193b9ad6fae1f372794a1c8 in lucene-solr's branch refs/heads/branch_6x from Mikhail Khludnev
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6168a5d ]

          SOLR-9620: fix cross core query time join by numeric fields

          Show
          jira-bot ASF subversion and git services added a comment - Commit 6168a5d63e43efd4d193b9ad6fae1f372794a1c8 in lucene-solr's branch refs/heads/branch_6x from Mikhail Khludnev [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6168a5d ] SOLR-9620 : fix cross core query time join by numeric fields
          Hide
          mkhludnev Mikhail Khludnev added a comment -

          It's resolved only in 6x, since master (7.0) doesn't support join by numeric.

          Show
          mkhludnev Mikhail Khludnev added a comment - It's resolved only in 6x , since master (7.0) doesn't support join by numeric.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development