/[Search-Estraier]/trunk/scripts/example_indexer.pl
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/scripts/example_indexer.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 102 - (show annotations)
Sat Jan 28 19:46:20 2006 UTC (18 years, 2 months ago) by dpavlin
File MIME type: text/plain
File size: 702 byte(s)
more documentation update
1 #!/usr/bin/perl -w
2
3 use strict;
4 use Search::Estraier;
5
6 =head1 NAME
7
8 example_indexer.pl - example indexer for Search::Estraier
9
10 =cut
11
12 # create and configure node
13 my $node = new Search::Estraier::Node(
14 url => 'http://localhost:1978/node/test',
15 user => 'admin',
16 passwd => 'admin'
17 );
18
19 # create document
20 my $doc = new Search::Estraier::Document;
21
22 # add attributes
23 $doc->add_attr('@uri', "http://estraier.gov/example.txt");
24 $doc->add_attr('@title', "Over the Rainbow");
25
26 # add body text to document
27 $doc->add_text("Somewhere over the rainbow. Way up high.");
28 $doc->add_text("There's a land that I heard of once in a lullaby.");
29
30 die "error: ", $node->status,"\n" unless (eval { $node->put_doc($doc) });
31

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26