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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.3
    • 6.4
    • None
    • 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

              mkhl Mikhail Khludnev
              mkhl Mikhail Khludnev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: