Skip to content

Commit

Permalink
Replaced calls to scrolled_search() with scroll_helper(), as used in
Browse files Browse the repository at this point in the history
Search::Elasticsearch
  • Loading branch information
clintongormley committed Apr 16, 2015
1 parent f760ab3 commit f4cea86
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Script/Backpan.pm
Expand Up @@ -39,7 +39,7 @@ sub update_status {
my $es = $self->es;
$es->trace_calls(1) if $ENV{DEBUG};

my $scroll = $es->scrolled_search(
my $scroll = $es->scroll_helper(
size => 500,
scroll => '2m',
index => 'cpan_v1',
Expand Down
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Script/Backup.pm
Expand Up @@ -73,7 +73,7 @@ sub run {
$file->dir->mkpath unless ( -e $file->dir );
my $fh = IO::Zlib->new( "$file", 'wb4' );

my $scroll = $es->scrolled_search(
my $scroll = $es->scroll_helper(
index => $self->index->name,
$self->type ? ( type => $self->type ) : (),
size => $self->size,
Expand Down
4 changes: 2 additions & 2 deletions lib/MetaCPAN/Script/Pagerank.pm
Expand Up @@ -18,7 +18,7 @@ sub run {

log_info {'Loading dependencies ...'};

my $scroll = $es->scrolled_search(
my $scroll = $es->scroll_helper(
index => $self->index->name,
type => 'release',
query => {
Expand Down Expand Up @@ -65,7 +65,7 @@ sub run {
sub get_recent_modules {
my $self = shift;
log_info {"Mapping modules to releases ..."};
my $scroll = $self->es->scrolled_search(
my $scroll = $self->es->scroll_helper(
index => $self->index->name,
type => 'file',
query => {
Expand Down
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Script/Session.pm
Expand Up @@ -11,7 +11,7 @@ with 'MetaCPAN::Role::Script', 'MooseX::Getopt';
sub run {
my $self = shift;

my $scroll = $self->es()->scrolled_search(
my $scroll = $self->es()->scroll_helper(
size => 10_000,
scroll => '1m',
index => 'user',
Expand Down
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Script/Watcher.pm
Expand Up @@ -185,7 +185,7 @@ sub reindex_release {
log_info {"Moving $release->{_source}->{name} to BackPAN"};

my $es = $self->es;
my $scroll = $es->scrolled_search(
my $scroll = $es->scroll_helper(
{
index => $self->index->name,
type => 'file',
Expand Down

0 comments on commit f4cea86

Please sign in to comment.