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

(-)a/C4/Utils/DataTables/Members.pm (-3 / +3 lines)
Lines 21-31 sub search { Link Here
21
        $searchmember = $dt_params->{sSearch} // '';
21
        $searchmember = $dt_params->{sSearch} // '';
22
    }
22
    }
23
23
24
    my ($sth, $query, $iTotalRecords, $iTotalDisplayRecords);
24
    my ($sth, $query1, $iTotalRecords, $iTotalDisplayRecords);
25
    my $dbh = C4::Context->dbh;
25
    my $dbh = C4::Context->dbh;
26
    # Get the iTotalRecords DataTable variable
26
    # Get the iTotalRecords DataTable variable
27
    $query = "SELECT COUNT(borrowers.borrowernumber) FROM borrowers";
27
    $query1 = "SELECT COUNT(borrowers.borrowernumber) FROM borrowers";
28
    $sth = $dbh->prepare($query);
28
    $sth = $dbh->prepare($query1);
29
    $sth->execute;
29
    $sth->execute;
30
    ($iTotalRecords) = $sth->fetchrow_array;
30
    ($iTotalRecords) = $sth->fetchrow_array;
31
31
(-)a/misc/search_tools/reindex_patrons.pl (-8 / +17 lines)
Lines 12-22 $indexer->drop_index; Link Here
12
12
13
my $patrons = Koha::Patrons->search;
13
my $patrons = Koha::Patrons->search;
14
14
15
15
my ( @id_buffer, @commit_buffer );
16
my ( @id_buffer, @commit_buffer );
16
while ( my $patron = $patrons->next ) {
17
while ( my $patron = $patrons->next ) {
17
    my $id = $patron->borrowernumber;
18
    my $id = $patron->borrowernumber;
18
    my $record = $patron->unblessed;
19
    my $record = $patron->unblessed;
19
    $record->{_id} = $id;
20
    $record->{es_id} = $id;
20
    $record->{category_type} = $patron->category->category_type;
21
    $record->{category_type} = $patron->category->category_type;
21
    push @id_buffer, $id;
22
    push @id_buffer, $id;
22
    push @commit_buffer, $record;
23
    push @commit_buffer, $record;
Lines 31-49 if ( !$indexer->store ) { Link Here
31
        data => {
32
        data => {
32
            properties => {
33
            properties => {
33
                borrowernumber => {
34
                borrowernumber => {
34
                    type => 'string',
35
                    type => 'text',
35
                    search_analyzer => 'analyser_standard',
36
                    search_analyzer => 'analyser_standard',
36
                    index_analyzer => 'analyser_standard',
37
                    analyzer => 'analyser_standard',
38
                    fielddata => 'true'
37
                },
39
                },
38
                cardnumber => {
40
                cardnumber => {
39
                    type => 'string',
41
                    type => 'text',
40
                    search_analyzer => 'analyser_standard',
42
                    search_analyzer => 'analyser_standard',
41
                    index_analyzer => 'analyser_standard',
43
                    analyzer => 'analyser_standard',
44
                    fielddata => 'true'
42
                },
45
                },
43
                surname => {
46
                surname => {
44
                    type => 'string',
47
                    type => 'text',
48
                    search_analyzer => 'analyser_standard',
49
                    analyzer => 'analyser_standard',
50
                    fielddata => 'true'
51
                },
52
                firstname => {
53
                    type => 'text',
45
                    search_analyzer => 'analyser_standard',
54
                    search_analyzer => 'analyser_standard',
46
                    index_analyzer => 'analyser_standard',
55
                    analyzer => 'analyser_standard',
56
                    fielddata => 'true'
47
                },
57
                },
48
            }
58
            }
49
        }
59
        }
50
- 

Return to bug 17500