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.

        Attachments

        1. SOLR-9620.patch
          17 kB
          Mikhail Khludnev

          Issue Links

            Activity

              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: