Class VignaScorer

  • All Implemented Interfaces:
    DelegatingScorer, Scorer, FlyweightPrototype<Scorer>

    public class VignaScorer
    extends AbstractWeightedScorer
    implements DelegatingScorer
    Computes the Vigna score of all interval iterators of a document.

    This scorer progressively moves score from a residual (initialised to 1) to the current score (initialised to 0). For each interval, we move a fraction of the residual equal to the ratio of the extent over the interval length, minimised with 1 and divided by 2. For instance, on a two-term query meeting intervals of length 2 will increase the score from 0 to 1/2, 3/4 and so on. On the other hand, larger intervals take away less from the residual.

    When the score exceeds .99, the computation is interrupted. In this way, we exploit the laziness of the algorithms for minimal-interval semantics implemented in it.unimi.di.big.mg4j.search, greatly improving performance for extremely frequent terms, with no perceivable effect on the score itself.