/[mws]/trunk/MWS_plucene.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

Annotation of /trunk/MWS_plucene.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9 - (hide annotations)
Thu May 6 07:32:24 2004 UTC (20 years ago) by dpavlin
File size: 479 byte(s)
extracted support for Plucene to separate file

1 dpavlin 9 #!/usr/bin/perl -w
2    
3     use strict;
4    
5     #
6     # simple implementation to use Lucene port to perl
7     #
8    
9     use Plucene::Simple;
10    
11     sub open_index {
12     my $self = shift;
13    
14     my $index_file = shift || croak "open_index needs index filename";
15    
16     $self->{index} = Plucene::Simple->open($index_file) || croak "can't open index '$index_file': $!";
17     return $self->{index};
18    
19     }
20    
21     sub search_index {
22     my $self = shift;
23    
24     my $s = shift || croak "search_index needs query";
25    
26     return $self->{index}->search($s);
27     }
28    
29     1;

  ViewVC Help
Powered by ViewVC 1.1.26