Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Require Search::Elasticsearch 1.20 or above

  • Loading branch information...
commit f81ba73d1e68563d21f5aba0e4c0aaf8b5d881ac 1 parent 120ece5
@clintongormley authored
View
4 Changes
@@ -1,3 +1,7 @@
+0.51 2015-05-25
+
+ Require Search::Elasticsearch v1.20
+
0.50 2014-08-17
********************************
BREAKING BACKWARDS COMPATIBILITY
View
3  cpanfile
@@ -18,7 +18,7 @@ requires "MooseX::Types" => "0";
requires "MooseX::Types::Moose" => "0";
requires "MooseX::Types::Structured" => "0";
requires "Scalar::Util" => "0";
-requires "Search::Elasticsearch" => "1.12";
+requires "Search::Elasticsearch" => "1.20";
requires "Sub::Exporter" => "0";
requires "Time::HiRes" => "0";
requires "Try::Tiny" => "0";
@@ -48,6 +48,7 @@ on 'configure' => sub {
};
on 'develop' => sub {
+ requires "Test::EOL" => "0";
requires "Test::More" => "0";
requires "Test::NoTabs" => "0";
requires "Test::Pod" => "1.41";
View
5 dist.ini
@@ -2,7 +2,7 @@ name = Elastic-Model
author = Clinton Gormley <drtech@cpan.org>
license = Perl_5
copyright_holder = Clinton Gormley
-version = 0.50
+version = 0.51
[GatherDir]
exclude_filename = README.pod
@@ -18,7 +18,7 @@ exclude_filename = cpanfile
[ExtraTests]
[PodSyntaxTests]
[Test::NoTabs]
-[EOLTests]
+[Test::EOL]
[CPANFile]
[CopyFilesFromBuild]
copy = cpanfile
@@ -48,6 +48,7 @@ repo = Elastic-Model
directory = t
directory = xt
directory = bench
+directory = examples
[License]
[ReadmeFromPod]
View
10 lib/Elastic/Manual/Delta.pod
@@ -12,6 +12,10 @@ a focus on things that affect backwards compatibility. This does duplicate
data from the Changes file, but aims to provide more details and when possible
workarounds.
+=head2 0.51
+
+Requires Search::Elasticsearch v1.20 or above. Tested on Elasticsearch v1.6
+
=head2 0.50
This is the first version which supports the B<1.x releases of Elasticsearch>,
@@ -122,8 +126,8 @@ follows:
=item Responses from Elasticsearch
-Some response formats have changed in Elasticsearch. The structure of the C
-<get-mapping> and C<get-settings> responses have changed, responses no longer
+Some response formats have changed in Elasticsearch. The structure of the
+C<get-mapping> and C<get-settings> responses have changed, responses no longer
include the C<ok> key, and the C<exists> has been replaced by C<found>. The
C<field> values are now returned as arrays rather than scalars.
@@ -177,4 +181,4 @@ The following attribute deprecations are deprecated and will be removed in a fut
=back
-=back
+=back
View
6 lib/Elastic/Manual/Intro.pod
@@ -13,8 +13,8 @@ You need a recent version of Java installed, then download the current
stable release of Elasticsearch from L<http://www.Elasticsearch.org/download/>.
For instance:
- curl -L -O https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-1.3.2.tar.gz
- tar -xzf elasticsearch-1.3.2.tar.gz
+ curl -L -O https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-1.6.0.tar.gz
+ tar -xzf elasticsearch-1.6.0.tar.gz
B<< Note: This version of Elastic::Model is intended for Elasticsearch 1.0
and above. However, it can be used with Elasticsearch 0.90.x in "compatibility mode".
@@ -31,7 +31,7 @@ against a local Elasticsearch cluster.
=head2 Start Elasticsearch
- cd elasticsearch-1.3.2/
+ cd elasticsearch-1.6.0/
./bin/elasticsearch # -d starts the server in the background
You now have a running Elasticsearch cluster with one node. You can test that
View
2  lib/Elastic/Model/Role/Model.pm
@@ -3,7 +3,7 @@ package Elastic::Model::Role::Model;
use Moose::Role;
use Carp;
use Elastic::Model::Types qw(ES);
-use Search::Elasticsearch 1.12 ();
+use Search::Elasticsearch 1.20 ();
use Class::Load qw(load_class);
use Moose::Util qw(does_role);
use MooseX::Types::Moose qw(:all);
View
7 lib/Elastic/Model/Types.pm
@@ -50,10 +50,7 @@ my @enums = (
'date', 'ip', 'geo_point'
],
TermVectorMapping,
- [ 'no', 'yes',
- 'with_offsets', 'with_positions',
- 'with_positions_offsets'
- ],
+ [ 'no', 'yes', 'with_offsets', 'with_positions', 'with_positions_offsets' ],
IndexMapping,
[ 'analyzed', 'not_analyzed', 'no' ],
DynamicMapping,
@@ -76,7 +73,7 @@ while ( my $type = shift @enums ) {
);
}
-class_type ES_1x, { class => 'Search::Elasticsearch::Client::Direct' };
+class_type ES_1x, { class => 'Search::Elasticsearch::Client::1_0::Direct' };
class_type ES_90, { class => 'Search::Elasticsearch::Client::0_90::Direct' };
#===================================
View
2  t/00_setup/02_load.t
@@ -65,7 +65,7 @@ isa_ok $model->view, 'Elastic::Model::View', 'View';
note 'Other';
isa_ok $model->store, 'Elastic::Model::Store', 'store';
-isa_ok $model->es, 'Search::Elasticsearch::Client::Direct', 'es';
+isa_ok $model->es, 'Search::Elasticsearch::Client::1_0::Direct', 'es';
done_testing;
View
4 t/20_namespace/03_alias.t
@@ -36,13 +36,13 @@ cmp_deeply $alias->aliased_to, { myapp2 => {}, myapp3 => {} },
ok $alias->to(
myapp2 => { routing => 'foo' },
- myapp3 => { filterb => { foo => 'bar' } }
+ myapp3 => { filterb => { name => 'bar' } }
),
'Alias with settings';
cmp_deeply $alias->aliased_to,
{
myapp2 => { index_routing => 'foo', search_routing => 'foo' },
- myapp3 => { filter => { term => { foo => 'bar' } } }
+ myapp3 => { filter => { term => { name => 'bar' } } }
},
'Aliased to myapp2/3';
View
20 t/40_view/02_view_methods.t
@@ -68,26 +68,24 @@ SKIP: {
}
## SCAN ##
+
+isa_ok $view
+ = $model->domain('myapp')->view->track_scores(1),
+ 'Elastic::Model::View',
+ 'View';
+
isa_ok $results = $view->scan, 'Elastic::Model::Results::Scrolled', 'Scan';
is $results->_scroll->scroll, '1m', 'Scan default time';
is $view->scan('30s')->_scroll->scroll, '30s', 'Scan manual time';
-is $results->total, 196, 'Scan total ';
-is $results->size, 196, 'Scan size';
-is $results->max_score, 0, 'Scan max score';
-isa_ok $results->facets, 'HASH', 'Scan facets';
-isa_ok $results->facet('name'), 'HASH', 'Scan named facet';
+is $results->total, 196, 'Scan total ';
+is $results->size, 196, 'Scan size';
+is $results->max_score, 0, 'Scan max score';
is 0 + ( $results->all ), 196, 'Scan - all results';
isa_ok $results->first, 'MyApp::User', 'Scan first';
ok $view->sort( [] )->scan, 'Scan empty sort';
throws_ok sub { $view->sort('_score')->scan }, qr/combined with sorting/,
'Scan sort';
-SKIP: {
- skip "aggs not supported in 0.90", 2 if $is_090;
- isa_ok $results->aggs, 'HASH', 'Search aggs';
- isa_ok $results->agg('name'), 'HASH', 'Search named agg';
-}
-
## FIRST ##
isa_ok $view->first, 'Elastic::Model::Result', 'First';
Please sign in to comment.
Something went wrong with that request. Please try again.