Skip to content

Commit

Permalink
switch to Search::Elasticsearch::Compat backend
Browse files Browse the repository at this point in the history
  • Loading branch information
nics committed Mar 10, 2014
1 parent d6e0915 commit 564a52d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Build.PL
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ my $builder = Module::Build->new(
'perl' => '5.10.1',
'Catmandu' => '0.8',
'CQL::Parser' => '1.12',
'Elasticsearch::Compat' => '0.04',
'Moo' => '1.00',
'Search::Elasticsearch::Compat' => '0.10',
},
add_to_cleanup => [qw(
Catmandu-Store-ElasticSearch-*
Expand Down
7 changes: 4 additions & 3 deletions lib/Catmandu/Store/ElasticSearch.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package Catmandu::Store::ElasticSearch;

use Catmandu::Sane;
use Moo;
use Elasticsearch::Compat;
use Search::Elasticsearch::Compat;
use Catmandu::Store::ElasticSearch::Bag;

with 'Catmandu::Store';
Expand All @@ -15,7 +15,7 @@ Catmandu::Store::ElasticSearch - A searchable store backed by Elasticsearch
This is the last version of L<Catmandu::Store::ElasticSearch>. Development will
continue as L<Catmandu::Store::Elasticsearch> using the official
L<Elasticsearch> client.
L<Search::Elasticsearch> client.
=head1 VERSION
Expand Down Expand Up @@ -80,7 +80,8 @@ has elastic_search => (

sub _build_elastic_search {
my $self = $_[0];
my $es = Elasticsearch::Compat->new(delete $self->{_args});
my $args = delete $self->{_args};
my $es = Search::Elasticsearch::Compat->new($args);
unless ($es->index_exists(index => $self->index_name)) {
$es->create_index(
index => $self->index_name,
Expand Down

0 comments on commit 564a52d

Please sign in to comment.