/[wait]/trunk/script/index_ora
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/script/index_ora

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

revision 68 by laperla, Thu Jan 24 01:53:25 2002 UTC revision 69 by laperla, Fri Jan 25 07:27:30 2002 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2  #                              -*- Mode: Perl -*-  #                              -*- Mode: Perl -*-
3  # $Basename$  # $Basename$
4  # $Revision: 1.6 $  # $Revision: 1.7 $
5  # Author          : Ulrich Pfeifer  # Author          : Ulrich Pfeifer
6  # Created On      : Mon Dec 31 13:57:11 2001  # Created On      : Mon Dec 31 13:57:11 2001
7  # Last Modified By: Ulrich Pfeifer  # Last Modified By: Ulrich Pfeifer
# Line 11  Line 11 
11  # (C) Copyright 2001, UUNET Deutschland GmbH, Germany  # (C) Copyright 2001, UUNET Deutschland GmbH, Germany
12  #  #
13    
14    use 5.007;
15    
16  use strict;  use strict;
17    
18  use File::Path;  use File::Path;
19  use DB_File;  use DB_File;
20  use Getopt::Long;  use Getopt::Long;
21  use Cwd;  use Cwd;
22    
23  require WAIT::Config;  BEGIN {require WAIT::Config;}
24  require WAIT::Database;  use WAIT::Database;
25  require WAIT::Parse::Ora;  use WAIT::Parse::Ora;
26  require WAIT::Document::Ora;  use WAIT::Document::Ora;
27  require WAIT::InvertedIndex;  use WAIT::InvertedIndex;
28    
29    
30  $DB_BTREE->{'cachesize'} = 200_000 ;  $DB_BTREE->{'cachesize'} = 200_000 ;
# Line 48  my $db = WAIT::Database->create(name Line 51  my $db = WAIT::Database->create(name
51    
52  my $layout = new WAIT::Parse::Ora;  my $layout = new WAIT::Parse::Ora;
53    
54  my $stem  = ['isotr', 'isolc', 'split2', 'stop', 'Stem'];  use lib "/usr/local/apache/lib";
55    use oreilly_de_catalog::wait_handler;
56    
57    my $stem  = ['OR_tr_20020124', 'OR_lc_20020124', 'split2', 'stop', 'Stem'];
58  my $text  = [{  my $text  = [{
59                'prefix'    => ['isotr', 'isolc'],                'prefix'    => ['OR_tr_20020124', 'OR_lc_20020124'],
60                'intervall' => ['isotr', 'isolc'],                'intervall' => ['OR_tr_20020124', 'OR_lc_20020124'],
61               },               },
62               'isotr', 'isolc', 'split2', 'stop'];               'OR_tr_20020124', 'OR_lc_20020124', 'split2', 'stop'];
63  my $sound = ['isotr', 'isolc', 'split2', 'Soundex'],;  my $sound = ['OR_tr_20020124', 'OR_lc_20020124', 'split2', 'Soundex'],;
64    
65  my $cwd = cwd;  my $cwd = cwd;
66    
# Line 81  my $tb = $db->create_table(name     => $ Line 87  my $tb = $db->create_table(name     => $
87  die "Couldn't create table $OPT{table}: $@\n" unless $tb;  die "Couldn't create table $OPT{table}: $@\n" unless $tb;
88    
89  my ($did, $value);  my ($did, $value);
90    binmode STDOUT, ":utf8";
91  while (($did, $value) = each %D) {  while (($did, $value) = each %D) {
92    my $record   = $layout->split($value);    my $record   = $layout->split($value);
93    my $headline = $record->{title};    my $headline = $record->{title};

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

  ViewVC Help
Powered by ViewVC 1.1.26