NAME

KinoSearch::Search::HitCollector - Process doc/score pairs.

SYNOPSIS

    # Abstract base class.

DESCRIPTION

A Scorer spits out raw doc_num/Tally pairs; a HitCollector decides what to do with them, based on how the abstract collect() method is implemented.

CONSTRUCTOR

new()

    package MyHitCollector;
    use base qw( KinoSearch::Search::HitCollector );
    our %foo;
    sub new {
        my $self = shift->SUPER::new;
        my %args = @_;
        $foo{$$self} = $args{foo};
        return $self;
    }

Abstract constructor. Takes no arguments.

METHODS

collect( [labeled params] )

Do something with a doc num and a Tally. (For instance, keep track of the docs with the ten highest scores.)

  • doc_num - A document number.
  • tally - A KinoSearch::Search::Tally (which communicates scoring data).

INHERITANCE

KinoSearch::Search::HitCollector isa KinoSearch::Obj.

COPYRIGHT

Copyright 2005-2008 Marvin Humphrey

LICENSE, DISCLAIMER, BUGS, etc.

See KinoSearch version 0.20.

Copyright © 2004-2008 Marvin Humphrey