ElasticSearch.pm 0.36 released, now with support for reindexing

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ElasticSearch.pm 0.36 released, now with support for reindexing

Clinton Gormley
Hi All

Given how often people ask about reindexing their data, I've added
support for it to ElasticSearch.pm (the Perl API).  

It now supports reindexing data from one index to another on the same
cluster, or from one cluster to another, transforming it on the way

For example, to copy the ElasticSearch website index locally, you could
do:


    my $local = ElasticSearch->new(
        servers => 'localhost:9200'
    );

    my $remote = ElasticSearch->new(
        servers    => 'search.elasticsearch.org:80',
        no_refresh => 1
    );

    my $source = $remote->scrolled_search(
        search_type => 'scan',
        scroll      => '5m'
    );

    $local->reindex(source=>$source);

More details and other new features blogged about here:
http://blogs.perl.org/users/clinton_gormley/2011/04/elasticsearchpm-v036-now-with-extra-sugar.html

clint