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

(-)a/Koha/BiblioUtils.pm (+5 lines)
Lines 140-145 sub get_all_biblios_iterator { Link Here
140
    my $rs = Koha::Biblios->search(
140
    my $rs = Koha::Biblios->search(
141
        $search_terms,
141
        $search_terms,
142
        $search_options );
142
        $search_options );
143
144
    if ( my $sql = $options{where} ) {
145
        $rs = $rs->search( \[$sql] );
146
    }
147
143
    my $next_func = sub {
148
    my $next_func = sub {
144
        # Warn and skip bad records, otherwise we break the loop
149
        # Warn and skip bad records, otherwise we break the loop
145
        while (1) {
150
        while (1) {
(-)a/Koha/MetadataRecord/Authority.pm (+5 lines)
Lines 201-206 sub get_all_authorities_iterator { Link Here
201
      $schema->resultset('AuthHeader')->search(
201
      $schema->resultset('AuthHeader')->search(
202
        $search_terms,
202
        $search_terms,
203
        $search_options);
203
        $search_options);
204
205
    if ( my $sql = $options{where} ) {
206
        $rs = $rs->search( \[$sql] );
207
    }
208
204
    my $next_func = sub {
209
    my $next_func = sub {
205
        # Warn and skip bad records, otherwise we break the loop
210
        # Warn and skip bad records, otherwise we break the loop
206
        while (1) {
211
        while (1) {
(-)a/misc/search_tools/rebuild_elasticsearch.pl (-2 / +11 lines)
Lines 34-39 B<rebuild_elasticsearch.pl> Link Here
34
[B<--desc>]
34
[B<--desc>]
35
[B<-bn|--bnumber>]
35
[B<-bn|--bnumber>]
36
[B<-ai|--authid>]
36
[B<-ai|--authid>]
37
[B<-w|--where SQL>]
37
[B<-p|--processes>]
38
[B<-p|--processes>]
38
[B<-v|--verbose>]
39
[B<-v|--verbose>]
39
[B<-h|--help>]
40
[B<-h|--help>]
Lines 87-92 repeated. Link Here
87
Only index the supplied authority id, mostly for testing purposes. May be
88
Only index the supplied authority id, mostly for testing purposes. May be
88
repeated.
89
repeated.
89
90
91
=item B<-w|--where>
92
93
Pass some additional SQL to limit the records to be indexed.
94
90
=item B<-p|--processes>
95
=item B<-p|--processes>
91
96
92
Number of processes to use for indexing. This can be used to do more indexing
97
Number of processes to use for indexing. This can be used to do more indexing
Lines 128-134 my $verbose = 0; Link Here
128
my $commit = 5000;
133
my $commit = 5000;
129
my ($delete, $reset, $help, $man, $processes);
134
my ($delete, $reset, $help, $man, $processes);
130
my ($index_biblios, $index_authorities);
135
my ($index_biblios, $index_authorities);
131
my (@biblionumbers,@authids);
136
my (@biblionumbers,@authids,$where);
132
my $desc;
137
my $desc;
133
138
134
$|=1; # flushes output
139
$|=1; # flushes output
Lines 142-147 GetOptions( Link Here
142
    'desc'          => \$desc,
147
    'desc'          => \$desc,
143
    'bn|bnumber=i'  => \@biblionumbers,
148
    'bn|bnumber=i'  => \@biblionumbers,
144
    'ai|authid=i'   => \@authids,
149
    'ai|authid=i'   => \@authids,
150
    'w|where=s'     => \$where,
145
    'p|processes=i' => \$processes,
151
    'p|processes=i' => \$processes,
146
    'v|verbose+'    => \$verbose,
152
    'v|verbose+'    => \$verbose,
147
    'h|help'        => \$help,
153
    'h|help'        => \$help,
Lines 197-202 if( $desc ){ Link Here
197
    $iterator_options{desc} = 1;
203
    $iterator_options{desc} = 1;
198
}
204
}
199
205
206
if ($where) {
207
    $iterator_options{where} = $where;
208
}
209
200
my $next;
210
my $next;
201
if ($index_biblios) {
211
if ($index_biblios) {
202
    _log(1, "Indexing biblios\n");
212
    _log(1, "Indexing biblios\n");
203
- 

Return to bug 35345