Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-8012

Improve Explanation class

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 8.0
    • None
    • New

    Description

      Explanation class is currently nice and simple, and float matches the scoring api, but this does not work well for debugging numerical errors of internal calculations (it usually makes practical sense to use 64-bit double to avoid issues).

      Also it makes for nasty formatting of integral values such as number of tokens in the collection or even document's length, its just noise to see 10.0 there instead of 10, and scientific notation for e.g. number of documents is just annoying.

      One idea is to take Number instead of float? Then you could pass in the correct numeric type (int,long,double,float) for internal calculations, parameters, statistics, etc, and output would look nice.

      Attachments

        1. LUCENE-8012.patch
          63 kB
          Alan Woodward
        2. LUCENE-8012.patch
          61 kB
          Alan Woodward

        Activity

          People

            Unassigned Unassigned
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: