single field search mapping to fill text indexes
[Biblio-Z3950.git] / server.pl
index fc807ae..91d45a1 100755 (executable)
--- a/server.pl
+++ b/server.pl
@@ -11,6 +11,8 @@ use Aleph;
 use GoogleBooks;
 use vuFind;
 use DPLA;
+use AlephTR;
+use CROSBI;
 
 use Encode;
 
@@ -23,6 +25,10 @@ my $databases = {
        'GOOGLEBOOKS' => 'GoogleBooks',
        'HATHITRUST' => 'vuFind',
        'DPLA'   => 'DPLA',
+       'MKUTUP' => 'AlephTR',
+       'CROSBI' => 'CROSBI',
+       'CROSBI-CASOPIS' => 'CROSBI',
+       'CROSBI-PREPRINT' => 'CROSBI',
 };
 
 my $max_records = 10; # XXX configure this
@@ -268,7 +274,8 @@ warn "# usemap ", dump($usemap);
         }
     }
     if ( defined( $attributes->{5} ) ) {                ## No truncation
-        die { errcode => 113, errstr => 5 };
+#      die { errcode => 113, errstr => 5 };
+       warn "# truncation is ignored";
     }
     my $comp = $attributes->{6};
     if ($prefix) {
@@ -283,7 +290,7 @@ warn "# usemap ", dump($usemap);
                warn "# using custom prefix_term query";
                $q = $usemap->{prefix_term}->( $prefix, $self->{term} );
        } else {
-       $q = $prefix . $self->{term} . '*';
+               $q = $prefix . $self->{term} . '*';
        }
        print "# q: $q\n";
        return $q;