/[mws]/trunk/MWS/Indexer.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/MWS/Indexer.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 41 - (show annotations)
Mon May 10 20:26:17 2004 UTC (20 years ago) by dpavlin
File size: 1094 byte(s)
major code re-structuring: separation of indexer code into target independent
and depended, documentation improvements

1 #!/usr/bin/perl -w
2
3 package MWS::Indexer;
4 use base 'MWS';
5 use strict;
6 use warnings;
7
8 use MWS;
9
10 our @ISA = qw(MWS);
11
12 our $VERSION = '1.00';
13
14 =head1 NAME
15
16 MWS::Indexer - index your data
17
18 =head1 DESCRIPTION
19
20 This is class which defines couple of methods which don't have to
21 be implemented for all indexers.
22
23 =head1 METHODS
24
25 =cut
26
27 =head2 open_index
28
29 This will open index in directory C<index_dir> in configuration file
30 with name which is same as name of configuration.
31
32 my $index = $self->open_index;
33
34 It saves index handle into $self->{index} and returns it.
35
36 =cut
37
38 =head2 create_index
39
40 This method will be called before index creation. If indexes support
41 on-the-fly adding to index (as Plucene does) this function is dummy.
42 However, for swish-e it will do magic (see L<MWS::SWISH>).
43
44 =cut
45
46 sub create_index {
47 my $self = shift;
48
49 }
50
51 =head2 close_index
52
53 Dummy method.
54
55 =cut
56
57 sub close_index {
58 my $self = shift;
59
60 print STDERR "dummy close_index called\n";
61
62 }
63
64 =head2 apropos_index
65
66 Dummy method.
67
68 =cut
69
70 sub apropos_index {
71 my $self = shift;
72
73 print STDERR "dummy apropos_index called\n";
74
75 }
76
77 1;

  ViewVC Help
Powered by ViewVC 1.1.26