1 # $Id: ScanEntry.pm,v 1.3 2003-03-12 17:08:53 pop Exp $
3 # Zebra perl API header
4 # =============================================================================
5 package IDZebra::ScanEntry;
12 use IDZebra::Logger qw(:flags :calls);
13 use Scalar::Util qw(weaken);
15 our $VERSION = do { my @r = (q$Revision: 1.3 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
18 use constant _term => 0;
19 use constant _occurrences => 1;
20 use constant _position => 2;
21 use constant _list => 3;
24 # -----------------------------------------------------------------------------
25 # Class constructors, destructor
26 # -----------------------------------------------------------------------------
30 my ($proto,@args) = @_;
31 my $class = ref($proto) || $proto;
33 bless ($self, $class);
34 weaken ($self->[_list]);
38 # =============================================================================
41 # logf(LOG_LOG,"DESTROY: IDZebra::ScanEntry");
44 # -----------------------------------------------------------------------------
47 return ($self->[_term]);
52 return ($self->[_occurrences]);
57 return ($self->[_position]);
62 # -----------------------------------------------------------------------------
67 IDZebra::ScanEntry - An entry of the scan results
71 foreach my $se ($sl->entries()) {
72 print STDERR ($se->position ,": ",
74 $se->occurrences() . "\n");
79 A scan entry describes occurrence of a term in the scanned index.
91 Position of term in the list. 1 based.
95 The occurrence count of the term in the selected database(s).
101 A I<resultSet> and maybe a I<records> method, to reach the records, where the term occurred.
109 Peter Popovics, pop@technomat.hu
113 IDZebra, IDZebra::ScanList, Zebra documentation