/[pgestraier]/trunk/bin/pgest-index.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/bin/pgest-index.pl

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

revision 81 by dpavlin, Tue Aug 8 11:40:09 2006 UTC revision 82 by dpavlin, Sun Nov 26 21:21:46 2006 UTC
# Line 61  If you specify value which is not unique Line 61  If you specify value which is not unique
61  of that item in index (which might be what you want). That's because specified  of that item in index (which might be what you want). That's because specified
62  C<pk> column will be used for C<@uri> in Hyper Estraier.  C<pk> column will be used for C<@uri> in Hyper Estraier.
63    
64    If name of primary key begins with C<_> it will not be added into text
65    indexing (so you won't be able to find prmary key value, but it will still
66    be available as attribute value).
67    
68  =item --user login  =item --user login
69    
70  =item --passwd password  =item --passwd password
# Line 190  if (! $c->{pk}) { Line 194  if (! $c->{pk}) {
194    
195  die "$0: can't find single column primary key for table ${table}. Please specify column with --pk\n" unless ($c->{pk});  die "$0: can't find single column primary key for table ${table}. Please specify column with --pk\n" unless ($c->{pk});
196    
197  warn "using primary key $c->{pk}\n";  warn "using primary key $c->{pk}", $c->{pk} =~ m/^_/ ? " (not indexed)" : "", "\n";
198    
199  $dbh->begin_work;  $dbh->begin_work;
200    
# Line 235  while (my $row = $sth->fetchrow_hashref( Line 239  while (my $row = $sth->fetchrow_hashref(
239                          $doc->add_attr($col, $val);                          $doc->add_attr($col, $val);
240    
241                          # add body text to document (make it searchable using full-text index)                          # add body text to document (make it searchable using full-text index)
242                          $doc->add_text($val);                          $doc->add_text($val) unless ($col =~ m/^_/);
243    
244                          $log .= "R";                          $log .= "R";
245                  } else {                  } else {

Legend:
Removed from v.81  
changed lines
  Added in v.82

  ViewVC Help
Powered by ViewVC 1.1.26