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

(-)a/misc/search_tools/rebuild_elasticsearch.pl (-1 / +20 lines)
Lines 36-41 B<rebuild_elasticsearch.pl> Link Here
36
[B<-ai|--authid>]
36
[B<-ai|--authid>]
37
[B<-p|--processes>]
37
[B<-p|--processes>]
38
[B<-v|--verbose>]
38
[B<-v|--verbose>]
39
[B<-t|--minutes>]
39
[B<-h|--help>]
40
[B<-h|--help>]
40
[B<--man>]
41
[B<--man>]
41
42
Lines 97-102 work in parallel on multicore systems. By default, a single process is used. Link Here
97
By default, this program only emits warnings and errors. This makes it talk
98
By default, this program only emits warnings and errors. This makes it talk
98
more. Add more to make it even more wordy, in particular when debugging.
99
more. Add more to make it even more wordy, in particular when debugging.
99
100
101
=item B<-t|--minutes>
102
103
indexes only the Biblios whose timestamp has changed in the last x minutes
104
100
=item B<-h|--help>
105
=item B<-h|--help>
101
106
102
Help!
107
Help!
Lines 129-134 my $commit = 5000; Link Here
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);
137
my ($minutes);
132
my $desc;
138
my $desc;
133
139
134
$|=1; # flushes output
140
$|=1; # flushes output
Lines 144-149 GetOptions( Link Here
144
    'ai|authid=i'   => \@authids,
150
    'ai|authid=i'   => \@authids,
145
    'p|processes=i' => \$processes,
151
    'p|processes=i' => \$processes,
146
    'v|verbose+'    => \$verbose,
152
    'v|verbose+'    => \$verbose,
153
    't|minutes=i'   => \$minutes,
147
    'h|help'        => \$help,
154
    'h|help'        => \$help,
148
    'man'           => \$man,
155
    'man'           => \$man,
149
);
156
);
Lines 198-203 if( $desc ){ Link Here
198
}
205
}
199
206
200
my $next;
207
my $next;
208
209
if ($minutes) {
210
    my $new_biblios = Koha::Biblios->search(\[ 'timestamp >= NOW() - INTERVAL ? MINUTE', $minutes ]);
211
    while (my $b = $new_biblios->next) {
212
        push @biblionumbers, $b->biblionumber;
213
    }
214
215
    if (scalar @biblionumbers == 0) {
216
        say "nothing to do";
217
        exit;
218
    }
219
}
220
201
if ($index_biblios) {
221
if ($index_biblios) {
202
    _log(1, "Indexing biblios\n");
222
    _log(1, "Indexing biblios\n");
203
    if (@biblionumbers) {
223
    if (@biblionumbers) {
204
- 

Return to bug 33243