/[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

Diff of /trunk/scripts/example_indexer.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 68 by dpavlin, Sun Jan 8 00:13:09 2006 UTC revision 102 by dpavlin, Sat Jan 28 19:46:20 2006 UTC
# Line 10  example_indexer.pl - example indexer for Line 10  example_indexer.pl - example indexer for
10  =cut  =cut
11    
12  # create and configure node  # create and configure node
13  my $node = new Search::Estraier::Node;  my $node = new Search::Estraier::Node(
14  $node->set_url("http://localhost:1978/node/test");          url => 'http://localhost:1978/node/test',
15  $node->set_auth("admin","admin");          user => 'admin',
16            passwd => 'admin'
17    );
18    
19  # create document  # create document
20  my $doc = new Search::Estraier::Document;  my $doc = new Search::Estraier::Document;
# Line 25  $doc->add_attr('@title', "Over the Rainb Line 27  $doc->add_attr('@title', "Over the Rainb
27  $doc->add_text("Somewhere over the rainbow.  Way up high.");  $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.");  $doc->add_text("There's a land that I heard of once in a lullaby.");
29    
30  die "error: ", $node->status,"\n" unless ($node->put_doc($doc));  die "error: ", $node->status,"\n" unless (eval { $node->put_doc($doc) });
31    

Legend:
Removed from v.68  
changed lines
  Added in v.102

  ViewVC Help
Powered by ViewVC 1.1.26