Lines 31-36
B<rebuild_elasticsearch.pl>
Link Here
|
31 |
[B<-r|--reset>] |
31 |
[B<-r|--reset>] |
32 |
[B<-a|--authorities>] |
32 |
[B<-a|--authorities>] |
33 |
[B<-b|--biblios>] |
33 |
[B<-b|--biblios>] |
|
|
34 |
[B<--desc>] |
34 |
[B<-bn|--bnumber>] |
35 |
[B<-bn|--bnumber>] |
35 |
[B<-ai|--authid>] |
36 |
[B<-ai|--authid>] |
36 |
[B<-p|--processes>] |
37 |
[B<-p|--processes>] |
Lines 70-75
specifying neither and so both get indexed.
Link Here
|
70 |
Index the biblios only. Combining this with B<-a> is the same as |
71 |
Index the biblios only. Combining this with B<-a> is the same as |
71 |
specifying neither and so both get indexed. |
72 |
specifying neither and so both get indexed. |
72 |
|
73 |
|
|
|
74 |
=item B<--desc> |
75 |
|
76 |
Index the records in descending id order. Intended to inde newer record before older records. |
77 |
Default is to index in ascending order. |
78 |
Does not work with --bnumber or --authid |
79 |
|
73 |
=item B<-bn|--bnumber> |
80 |
=item B<-bn|--bnumber> |
74 |
|
81 |
|
75 |
Only index the supplied biblionumber, mostly for testing purposes. May be |
82 |
Only index the supplied biblionumber, mostly for testing purposes. May be |
Lines 122-127
my $commit = 5000;
Link Here
|
122 |
my ($delete, $reset, $help, $man, $processes); |
129 |
my ($delete, $reset, $help, $man, $processes); |
123 |
my ($index_biblios, $index_authorities); |
130 |
my ($index_biblios, $index_authorities); |
124 |
my (@biblionumbers,@authids); |
131 |
my (@biblionumbers,@authids); |
|
|
132 |
my $desc; |
125 |
|
133 |
|
126 |
$|=1; # flushes output |
134 |
$|=1; # flushes output |
127 |
|
135 |
|
Lines 131-138
GetOptions(
Link Here
|
131 |
'r|reset' => \$reset, |
139 |
'r|reset' => \$reset, |
132 |
'a|authorities' => \$index_authorities, |
140 |
'a|authorities' => \$index_authorities, |
133 |
'b|biblios' => \$index_biblios, |
141 |
'b|biblios' => \$index_biblios, |
134 |
'bn|bnumber=i' => \@biblionumbers, |
142 |
'desc' => \$desc, |
135 |
'ai|authid=i' => \@authids, |
143 |
'bn|bnumber=i' => \@biblionumbers, |
|
|
144 |
'ai|authid=i' => \@authids, |
136 |
'p|processes=i' => \$processes, |
145 |
'p|processes=i' => \$processes, |
137 |
'v|verbose+' => \$verbose, |
146 |
'v|verbose+' => \$verbose, |
138 |
'h|help' => \$help, |
147 |
'h|help' => \$help, |
Lines 183-188
if ($slice_count > 1) {
Link Here
|
183 |
$iterator_options{slice} = { index => $slice_index, count => $slice_count }; |
192 |
$iterator_options{slice} = { index => $slice_index, count => $slice_count }; |
184 |
} |
193 |
} |
185 |
|
194 |
|
|
|
195 |
if( $desc ){ |
196 |
$iterator_options{desc} = 1; |
197 |
} |
198 |
|
186 |
my $next; |
199 |
my $next; |
187 |
if ($index_biblios) { |
200 |
if ($index_biblios) { |
188 |
_log(1, "Indexing biblios\n"); |
201 |
_log(1, "Indexing biblios\n"); |
189 |
- |
|
|