View | Details | Raw Unified | Return to bug 7440
Collapse All | Expand All

(-)a/C4/AuthoritiesMarc.pm (-46 / +23 lines)
Lines 328-339 counts Usage of Authid in bibliorecords. Link Here
328
328
329
sub CountUsage {
329
sub CountUsage {
330
    my ($authid) = @_;
330
    my ($authid) = @_;
331
    if (C4::Context->preference('NoZebra')) {
332
        # Read the index Koha-Auth-Number for this authid and count the lines
333
        my $result = C4::Search::NZanalyse("an=$authid");
334
        my @tab = split /;/,$result;
335
        return scalar @tab;
336
    } else {
337
        ### ZOOM search here
331
        ### ZOOM search here
338
        my $query;
332
        my $query;
339
        $query= "an:".$authid;
333
        $query= "an:".$authid;
Lines 344-350 sub CountUsage { Link Here
344
        }
338
        }
345
339
346
        return $result;
340
        return $result;
347
    }
348
}
341
}
349
342
350
=head2 CountUsageChildren 
343
=head2 CountUsageChildren 
Lines 1413-1458 sub merge { Link Here
1413
    my @reccache;
1406
    my @reccache;
1414
    # search all biblio tags using this authority.
1407
    # search all biblio tags using this authority.
1415
    #Getting marcbiblios impacted by the change.
1408
    #Getting marcbiblios impacted by the change.
1416
    if (C4::Context->preference('NoZebra')) {
1409
    #zebra connection  
1417
        #nozebra way    
1410
    my $oConnection=C4::Context->Zconn("biblioserver",0);
1418
        my $dbh=C4::Context->dbh;
1411
    # We used to use XML syntax here, but that no longer works.
1419
        my $rq=$dbh->prepare(qq(SELECT biblionumbers from nozebra where indexname="an" and server="biblioserver" and value="$mergefrom" ));
1412
    # Thankfully, we don't need it.
1420
        $rq->execute;
1413
    my $query;
1421
        while (my $biblionumbers=$rq->fetchrow){
1414
    $query= "an=".$mergefrom;
1422
            my @biblionumbers=split /;/,$biblionumbers;
1415
    my $oResult = $oConnection->search(new ZOOM::Query::CCL2RPN( $query, $oConnection ));
1423
            foreach (@biblionumbers) {
1416
    my $count = 0;
1424
                if ($_=~/(\d+),.*/) {
1417
    if  ($oResult) {
1425
                    my $marc=GetMarcBiblio($1);
1418
        $count=$oResult->size();
1426
                    push @reccache,$marc;
1419
    }
1427
                }
1420
    my $z=0;
1428
            }
1421
    while ( $z<$count ) {
1429
        }
1422
        my $rec;
1430
    } else {
1423
        $rec=$oResult->record($z);
1431
        #zebra connection  
1424
        my $marcdata = $rec->raw();
1432
        my $oConnection=C4::Context->Zconn("biblioserver",0);
1425
        my $marcrecordzebra= MARC::Record->new_from_usmarc($marcdata);
1433
        # We used to use XML syntax here, but that no longer works.
1426
        my ( $biblionumbertagfield, $biblionumbertagsubfield ) = &GetMarcFromKohaField( "biblio.biblionumber", '' );
1434
        # Thankfully, we don't need it.
1427
        my $i = ($biblionumbertagfield < 10) ? $marcrecordzebra->field($biblionumbertagfield)->data : $marcrecordzebra->subfield($biblionumbertagfield, $biblionumbertagsubfield);
1435
        my $query;
1428
        my $marcrecorddb=GetMarcBiblio($i);
1436
        $query= "an=".$mergefrom;
1429
        push @reccache, $marcrecorddb;
1437
        my $oResult = $oConnection->search(new ZOOM::Query::CCL2RPN( $query, $oConnection ));
1430
        $z++;
1438
        my $count = 0;
1439
        if  ($oResult) {
1440
            $count=$oResult->size();
1441
        }
1442
        my $z=0;
1443
        while ( $z<$count ) {
1444
            my $rec;
1445
            $rec=$oResult->record($z);
1446
            my $marcdata = $rec->raw();
1447
            my $marcrecordzebra= MARC::Record->new_from_usmarc($marcdata);
1448
            my ( $biblionumbertagfield, $biblionumbertagsubfield ) = &GetMarcFromKohaField( "biblio.biblionumber", '' );
1449
            my $i = ($biblionumbertagfield < 10) ? $marcrecordzebra->field($biblionumbertagfield)->data : $marcrecordzebra->subfield($biblionumbertagfield, $biblionumbertagsubfield);
1450
            my $marcrecorddb=GetMarcBiblio($i);
1451
            push @reccache, $marcrecorddb;
1452
            $z++;
1453
        }
1454
        $oResult->destroy();
1455
    }
1431
    }
1432
    $oResult->destroy();
1456
    #warn scalar(@reccache)." biblios to update";
1433
    #warn scalar(@reccache)." biblios to update";
1457
    # Get All candidate Tags for the change 
1434
    # Get All candidate Tags for the change 
1458
    # (This will reduce the search scope in marc records).
1435
    # (This will reduce the search scope in marc records).
(-)a/C4/Search.pm (-8 lines)
Lines 1257-1270 sub buildQuery { Link Here
1257
    my $fuzzy_enabled    = C4::Context->preference("QueryFuzzy")           || 0;
1257
    my $fuzzy_enabled    = C4::Context->preference("QueryFuzzy")           || 0;
1258
    my $remove_stopwords = C4::Context->preference("QueryRemoveStopwords") || 0;
1258
    my $remove_stopwords = C4::Context->preference("QueryRemoveStopwords") || 0;
1259
1259
1260
    # no stemming/weight/fuzzy in NoZebra
1261
    if ( C4::Context->preference("NoZebra") ) {
1262
        $stemming         = 0;
1263
        $weight_fields    = 0;
1264
        $fuzzy_enabled    = 0;
1265
    	$auto_truncation  = 0;
1266
    }
1267
1268
    my $query        = $operands[0];
1260
    my $query        = $operands[0];
1269
    my $simple_query = $operands[0];
1261
    my $simple_query = $operands[0];
1270
1262
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/stopwords.tt (-3 lines)
Lines 2-9 Link Here
2
2
3
<h1>Stop Words</h1>
3
<h1>Stop Words</h1>
4
4
5
<p style="color: #990000">Important: If NoZebra is set to 'Use' this option will not appear on the administration menu</p>
6
7
<p>Stop words are words that you want the search system to ignore.</p>
5
<p>Stop words are words that you want the search system to ignore.</p>
8
6
9
<p>Koha comes with a standard list of stop words that can be edited by visiting the Stop Word administration area.</p>
7
<p>Koha comes with a standard list of stop words that can be edited by visiting the Stop Word administration area.</p>
10
- 

Return to bug 7440