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

Cloud MLT field boost not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 5.0, 5.1, 5.2, 5.2.1, 5.3, 5.3.1, 5.3.2, 5.4, 5.4.1, 5.5, 5.5.1, 5.5.2, 5.5.3, 5.6, 6.0, 6.0.1, 6.0.2, 6.1, 6.1.1, 6.2
    • None
    • MoreLikeThis
    • None

    Description

      When boosting by field "fieldname otherFieldName^4.0" the boost is not stripped from the field name when adding to fieldNames ArrayList. So on line 133 of CloudMLTQParser when adding field content to the filteredDocument the field is not found (incorrectly trying to find 'otherFieldName^4.0').

      The easiest but perhaps hackiest solution is to overwrite qf:

      if (localParams.get("boost") != null) {
      	mlt.setBoost(localParams.getBool("boost"));
      	boostFields = SolrPluginUtils.parseFieldBoosts(qf);
      	qf = boostFields.keySet().toArray(qf);
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bgfeldm Brian Feldman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: