File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1212use Try::Tiny qw< catch try > ;
1313
1414use MetaCPAN::ES;
15- use MetaCPAN::Ingest qw< home > ;
15+ use MetaCPAN::Ingest qw< home true > ;
1616
1717# config
1818
8282 $bulk_store {$key } ||= $es -> bulk( max_count => $batch_size );
8383 my $bulk = $bulk_store {$key };
8484
85- my $parent = $raw -> {fields }{ _parent };
85+ my $parent = $raw -> {_parent };
8686
8787 if ( $raw -> {_type } eq ' author' ) {
8888
@@ -169,9 +169,12 @@ sub run_backup {
169169 ( $type ? ( type => $type ) : () )
170170 );
171171 my $scroll = $es -> scroll(
172- size => $size ,
173- fields => [qw< _parent _source > ],
174172 scroll => ' 1m' ,
173+ body => {
174+ _source => true,
175+ size => $size ,
176+ sort => ' _doc' ,
177+ },
175178 );
176179
177180 log_info { ' Backing up ' , $scroll -> total, ' documents' };
You can’t perform that action at this time.
0 commit comments