--- cvs-head/script/index_ora 2002/01/27 15:27:38 71 +++ cvs-head/script/index_ora 2002/01/28 21:35:39 72 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # -*- Mode: Perl -*- # $Basename$ -# $Revision: 1.8 $ +# $Revision: 1.9 $ # Author : Ulrich Pfeifer # Created On : Mon Dec 31 13:57:11 2001 # Last Modified By: Ulrich Pfeifer @@ -63,6 +63,7 @@ 'OR_tr_20020124', 'OR_lc_20020124', 'split2', 'stop']; my $sound = ['OR_tr_20020124', 'OR_lc_20020124', 'split2', 'Soundex']; my $trigr = ['OR_lc_20020124', 'OR_trigrams_20020125']; +my $isbn = ['split6', 'OR_isbn_20020127']; my $cwd = cwd; @@ -77,13 +78,16 @@ access => $access, invindex => [ - 'title' => $stem, - 'about' => $stem, - 'text' => $text, + 'title' => $text, + # 'title' => $stem, + 'aboutauthor' => $text, + # 'aboutauthor' => $stem, + 'desc' => $text, + 'abstract' => $text, 'author' => $text, + # 'author' => $sound, 'colophon' => $text, - 'author' => $sound, - 'isbn' => $text, + 'isbn' => $isbn, ] ); die "Couldn't create table $OPT{table}: $@\n" unless $tb; @@ -103,13 +107,18 @@ my $tritb = $db->create_table( name => "$OPT{table}_fallback", - attr => [qw(docid headline)], + attr => [qw(docid headline)], # name + # "headline" + # only for + # sman invindex => [ headline => $trigr ], ); my %dict; for my $f ($tb->fields) { my(@idx) = @{$tb->table->{inverted}{$f} || []}; for my $idx (@idx) { + my $name = $idx->name; + next if $name =~ /(_|\b)(Stem|Soundex)(\b|_)/; # irrelevant for alternatives my @keys = $idx->keys; @dict{@keys} = (); } @@ -121,6 +130,7 @@ Dump $headline; $maxdebug--; } + # printf "%s\n", substr($headline,0,60); $tritb->insert(docid => $headline, headline => $headline); } $tritb->set(top=>1); @@ -139,6 +149,8 @@ symlink $long_dir, $prel_slink or die "Could not symlink $long_dir, $prel_slink: $!"; rename $prel_slink, $want_dir or die "Could not rename $prel_slink, $want_dir: $!"; +system("chmod 777 $want_dir/*/read")==0 or die; + $WAIT::Config = $WAIT::Config; # make perl -w happy