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

A real scaling normalizer in solr-ltr

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 6.4.1
    • None
    • None

    Description

      The current solr-ltr plugin provider two different normalizer implementations, minMax and standard normalizer. The mimMax normalizer doesn't seem to correctly scale the values to fall in between the given min and max. The solr scale function [1] appropriately scales the values to fall in between the given range. But it cannot be used as it is, because it has performance problems and makes the scoring process really slow.

      For example if I have a data set [11,51,16,42,18,21] and if we want to scale the values to 1 to 10, I would except the max value in the data set (which is 51) to be normalized to 10, and min value which is 11, to be normalized to 1.
      Here is sample output of the minMax normalizer vs Scaling normalizer

      Input MinMax Normalizer Scaling Normalizer
      11.0 1.1111112 1.0
      51.0 5.5555553 10.0
      16.0 1.6666666 2.125
      42.0 4.5555553 7.975
      18.0 1.8888888 2.5749998
      21.0 2.2222223 3.25

      [1]https://wiki.apache.org/solr/FunctionQuery#scale

      Attachments

        Activity

          People

            Unassigned Unassigned
            rahul290484 Rahul Babulal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: