elasticsearch-dsl 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/elasticsearch-dsl.gemspec +4 -4
  4. data/lib/elasticsearch/dsl/search.rb +14 -0
  5. data/lib/elasticsearch/dsl/search/aggregations/range.rb +2 -1
  6. data/lib/elasticsearch/dsl/search/filters/has_child.rb +1 -0
  7. data/lib/elasticsearch/dsl/search/filters/has_parent.rb +1 -0
  8. data/lib/elasticsearch/dsl/search/options.rb +0 -1
  9. data/lib/elasticsearch/dsl/search/queries/has_child.rb +1 -0
  10. data/lib/elasticsearch/dsl/search/queries/has_parent.rb +1 -0
  11. data/lib/elasticsearch/dsl/search/queries/match.rb +1 -0
  12. data/lib/elasticsearch/dsl/search/queries/match_phrase.rb +33 -0
  13. data/lib/elasticsearch/dsl/search/queries/match_phrase_prefix.rb +32 -0
  14. data/lib/elasticsearch/dsl/search/queries/simple_query_string.rb +4 -2
  15. data/lib/elasticsearch/dsl/version.rb +1 -1
  16. data/test/integration/search_aggregation_children_test.rb +8 -3
  17. data/test/integration/search_aggregation_geo_test.rb +1 -1
  18. data/test/integration/search_aggregation_nested_test.rb +14 -8
  19. data/test/integration/search_aggregations_test.rb +14 -6
  20. data/test/integration/search_filters_test.rb +31 -120
  21. data/test/integration/search_query_test.rb +9 -1
  22. data/test/integration/search_size_from_test.rb +5 -1
  23. data/test/integration/search_sort_test.rb +4 -4
  24. data/test/integration/search_suggest_test.rb +32 -11
  25. data/test/integration/search_test.rb +1 -1
  26. data/test/test_helper.rb +24 -5
  27. data/test/unit/aggregations/avg_test.rb +1 -1
  28. data/test/unit/aggregations/cardinality_test.rb +5 -5
  29. data/test/unit/aggregations/children_test.rb +1 -1
  30. data/test/unit/aggregations/date_histogram_test.rb +1 -1
  31. data/test/unit/aggregations/date_range_test.rb +1 -1
  32. data/test/unit/aggregations/extended_stats_test.rb +1 -1
  33. data/test/unit/aggregations/filter_test.rb +1 -1
  34. data/test/unit/aggregations/filters_test.rb +1 -1
  35. data/test/unit/aggregations/geo_bounds_test.rb +1 -1
  36. data/test/unit/aggregations/geo_distance_test.rb +1 -1
  37. data/test/unit/aggregations/geohash_grid_test.rb +1 -1
  38. data/test/unit/aggregations/global_test.rb +1 -1
  39. data/test/unit/aggregations/histogram_test.rb +1 -1
  40. data/test/unit/aggregations/ip_range_test.rb +1 -1
  41. data/test/unit/aggregations/max_test.rb +1 -1
  42. data/test/unit/aggregations/min_test.rb +1 -1
  43. data/test/unit/aggregations/missing_test.rb +1 -1
  44. data/test/unit/aggregations/nested_test.rb +1 -1
  45. data/test/unit/aggregations/percentile_ranks_test.rb +1 -1
  46. data/test/unit/aggregations/percentiles_test.rb +1 -1
  47. data/test/unit/aggregations/pipeline/avg_bucket_test.rb +1 -1
  48. data/test/unit/aggregations/pipeline/bucket_script_test.rb +1 -1
  49. data/test/unit/aggregations/pipeline/bucket_selector_test.rb +1 -1
  50. data/test/unit/aggregations/pipeline/cumulative_sum_test.rb +1 -1
  51. data/test/unit/aggregations/pipeline/derivative_test.rb +1 -1
  52. data/test/unit/aggregations/pipeline/extended_stats_bucket_test.rb +1 -1
  53. data/test/unit/aggregations/pipeline/max_bucket_test.rb +1 -1
  54. data/test/unit/aggregations/pipeline/min_bucket_test.rb +1 -1
  55. data/test/unit/aggregations/pipeline/moving_avg_test.rb +1 -1
  56. data/test/unit/aggregations/pipeline/percentiles_bucket_test.rb +1 -1
  57. data/test/unit/aggregations/pipeline/serial_diff_test.rb +1 -1
  58. data/test/unit/aggregations/pipeline/stats_bucket_test.rb +1 -1
  59. data/test/unit/aggregations/pipeline/sum_bucket_test.rb +1 -1
  60. data/test/unit/aggregations/range_test.rb +12 -1
  61. data/test/unit/aggregations/reverse_nested_test.rb +2 -2
  62. data/test/unit/aggregations/scripted_metric_test.rb +1 -1
  63. data/test/unit/aggregations/significant_terms_test.rb +1 -1
  64. data/test/unit/aggregations/stats_test.rb +1 -1
  65. data/test/unit/aggregations/sum_test.rb +1 -1
  66. data/test/unit/aggregations/terms_test.rb +1 -1
  67. data/test/unit/aggregations/top_hits_test.rb +1 -1
  68. data/test/unit/aggregations/value_count_test.rb +1 -1
  69. data/test/unit/dsl_test.rb +1 -1
  70. data/test/unit/filters/and_test.rb +1 -1
  71. data/test/unit/filters/bool_test.rb +1 -1
  72. data/test/unit/filters/exists_test.rb +1 -1
  73. data/test/unit/filters/geo_bounding_box_test.rb +1 -1
  74. data/test/unit/filters/geo_distance_range_test.rb +1 -1
  75. data/test/unit/filters/geo_distance_test.rb +1 -1
  76. data/test/unit/filters/geo_polygon_test.rb +1 -1
  77. data/test/unit/filters/geo_shape_test.rb +5 -5
  78. data/test/unit/filters/geohash_cell_test.rb +1 -1
  79. data/test/unit/filters/has_child_test.rb +4 -2
  80. data/test/unit/filters/has_parent_test.rb +4 -2
  81. data/test/unit/filters/ids_test.rb +1 -1
  82. data/test/unit/filters/indices_test.rb +1 -1
  83. data/test/unit/filters/limit_test.rb +1 -1
  84. data/test/unit/filters/match_all_test.rb +2 -2
  85. data/test/unit/filters/missing_test.rb +1 -1
  86. data/test/unit/filters/nested_test.rb +1 -1
  87. data/test/unit/filters/not_test.rb +1 -1
  88. data/test/unit/filters/or_test.rb +1 -1
  89. data/test/unit/filters/prefix_test.rb +1 -1
  90. data/test/unit/filters/query_test.rb +1 -1
  91. data/test/unit/filters/range_test.rb +1 -1
  92. data/test/unit/filters/regexp_test.rb +1 -1
  93. data/test/unit/filters/script_test.rb +1 -1
  94. data/test/unit/filters/term_test.rb +1 -1
  95. data/test/unit/filters/terms_test.rb +1 -1
  96. data/test/unit/filters/type_test.rb +5 -5
  97. data/test/unit/queries/bool_test.rb +3 -3
  98. data/test/unit/queries/boosting_test.rb +1 -1
  99. data/test/unit/queries/common_test.rb +1 -1
  100. data/test/unit/queries/constant_score_test.rb +1 -1
  101. data/test/unit/queries/dis_max_test.rb +1 -1
  102. data/test/unit/queries/exists_test.rb +1 -1
  103. data/test/unit/queries/filtered_test.rb +1 -1
  104. data/test/unit/queries/function_score_test.rb +1 -1
  105. data/test/unit/queries/fuzzy_like_this_field_test.rb +5 -5
  106. data/test/unit/queries/fuzzy_like_this_test.rb +1 -1
  107. data/test/unit/queries/fuzzy_test.rb +1 -1
  108. data/test/unit/queries/geo_shape_test.rb +1 -1
  109. data/test/unit/queries/has_child_test.rb +4 -2
  110. data/test/unit/queries/has_parent_test.rb +4 -2
  111. data/test/unit/queries/ids_test.rb +1 -1
  112. data/test/unit/queries/indices_test.rb +1 -1
  113. data/test/unit/queries/match_all_test.rb +1 -1
  114. data/test/unit/queries/match_phrase_prefix_test.rb +62 -0
  115. data/test/unit/queries/match_phrase_test.rb +63 -0
  116. data/test/unit/queries/match_test.rb +1 -1
  117. data/test/unit/queries/more_like_this_test.rb +1 -1
  118. data/test/unit/queries/multi_match_test.rb +1 -1
  119. data/test/unit/queries/nested_test.rb +1 -1
  120. data/test/unit/queries/prefix_test.rb +5 -5
  121. data/test/unit/queries/query_string_test.rb +1 -1
  122. data/test/unit/queries/range_test.rb +1 -1
  123. data/test/unit/queries/regexp_test.rb +1 -1
  124. data/test/unit/queries/simple_query_string_test.rb +6 -8
  125. data/test/unit/queries/span_first_test.rb +1 -1
  126. data/test/unit/queries/span_multi_test.rb +1 -1
  127. data/test/unit/queries/span_near_test.rb +1 -1
  128. data/test/unit/queries/span_not_test.rb +1 -1
  129. data/test/unit/queries/span_or_test.rb +1 -1
  130. data/test/unit/queries/span_term_test.rb +1 -1
  131. data/test/unit/queries/template_test.rb +1 -1
  132. data/test/unit/queries/term_test.rb +1 -1
  133. data/test/unit/queries/terms_test.rb +1 -1
  134. data/test/unit/queries/top_children_test.rb +1 -1
  135. data/test/unit/queries/wildcard_test.rb +1 -1
  136. data/test/unit/search_aggregation_test.rb +1 -1
  137. data/test/unit/search_base_aggregation_component_test.rb +1 -1
  138. data/test/unit/search_base_component_test.rb +1 -1
  139. data/test/unit/search_filter_test.rb +1 -1
  140. data/test/unit/search_highlight_test.rb +1 -1
  141. data/test/unit/search_options_test.rb +1 -1
  142. data/test/unit/search_query_test.rb +1 -1
  143. data/test/unit/search_size_from_test.rb +1 -1
  144. data/test/unit/search_sort_test.rb +1 -1
  145. data/test/unit/search_suggest_test.rb +1 -1
  146. data/test/unit/search_test.rb +3 -1
  147. data/test/unit/utils_test.rb +1 -1
  148. metadata +24 -32
@@ -7,7 +7,7 @@ module Elasticsearch
7
7
 
8
8
  context "Queries integration" do
9
9
  startup do
10
- Elasticsearch::Extensions::Test::Cluster.start(nodes: 1) if ENV['SERVER'] and not Elasticsearch::Extensions::Test::Cluster.running?
10
+ Elasticsearch::Extensions::Test::Cluster.start(number_of_nodes: 1) if ENV['SERVER'] and not Elasticsearch::Extensions::Test::Cluster.running?(number_of_nodes: 1)
11
11
  end
12
12
 
13
13
  setup do
@@ -25,6 +25,14 @@ module Elasticsearch
25
25
  end
26
26
  end
27
27
 
28
+ context "for match_phrase_prefix query" do
29
+ should "find the document" do
30
+ response = @client.search index: 'test', body: search { query { match_phrase_prefix title: 'te' } }.to_hash
31
+
32
+ assert_equal 1, response['hits']['total']
33
+ end
34
+ end
35
+
28
36
  context "for query_string query" do
29
37
  should "find the document" do
30
38
  response = @client.search index: 'test', body: search { query { query_string { query 'te*' } } }.to_hash
@@ -7,7 +7,11 @@ module Elasticsearch
7
7
 
8
8
  context "Search results pagination" do
9
9
  setup do
10
+ @client.indices.create index: 'test', body: {
11
+ mappings: { d: { properties: { title: { type: 'text', fields: { keyword: { type: 'keyword' } } } } } } }
12
+
10
13
  25.times { |i| @client.index index: 'test', type: 'd', id: i, body: { title: "Test #{sprintf('%03d', i)}" } }
14
+
11
15
  @client.indices.refresh index: 'test'
12
16
  end
13
17
 
@@ -26,7 +30,7 @@ module Elasticsearch
26
30
  query { match(:title) { query 'test' and type 'phrase_prefix' } }
27
31
  size 5
28
32
  from 5
29
- sort { by :title }
33
+ sort { by 'title.keyword' }
30
34
  }.to_hash
31
35
 
32
36
  assert_equal 25, response['hits']['total']
@@ -7,13 +7,13 @@ module Elasticsearch
7
7
 
8
8
  context "Sorting integration" do
9
9
  startup do
10
- Elasticsearch::Extensions::Test::Cluster.start(nodes: 1) if ENV['SERVER'] and not Elasticsearch::Extensions::Test::Cluster.running?
10
+ Elasticsearch::Extensions::Test::Cluster.start(number_of_nodes: 1) if ENV['SERVER'] and not Elasticsearch::Extensions::Test::Cluster.running?(number_of_nodes: 1)
11
11
  end
12
12
 
13
13
  setup do
14
14
  @client.indices.create index: 'test'
15
- @client.index index: 'test', type: 'd', id: '1', body: { tags: ['one'], clicks: 5 }
16
- @client.index index: 'test', type: 'd', id: '2', body: { tags: ['one', 'two'], clicks: 15 }
15
+ @client.index index: 'test', type: 'd', id: '1', body: { tags: ['one'], clicks: 15 }
16
+ @client.index index: 'test', type: 'd', id: '2', body: { tags: ['one', 'two'], clicks: 5 }
17
17
  @client.index index: 'test', type: 'd', id: '3', body: { tags: ['one', 'three'], clicks: 20 }
18
18
  @client.indices.refresh index: 'test'
19
19
  end
@@ -26,7 +26,7 @@ module Elasticsearch
26
26
  end
27
27
  }.to_hash
28
28
 
29
- assert_same_elements ['3', '2', '1'], response['hits']['hits'].map { |d| d['_id'] }
29
+ assert_same_elements ['3', '1', '2'], response['hits']['hits'].map { |d| d['_id'] }
30
30
  end
31
31
  end
32
32
 
@@ -9,7 +9,7 @@ module Elasticsearch
9
9
 
10
10
  context "Suggest integration" do
11
11
  startup do
12
- Elasticsearch::Extensions::Test::Cluster.start(nodes: 1) if ENV['SERVER'] and not Elasticsearch::Extensions::Test::Cluster.running?
12
+ Elasticsearch::Extensions::Test::Cluster.start(number_of_nodes: 1) if ENV['SERVER'] and not Elasticsearch::Extensions::Test::Cluster.running?(number_of_nodes: 1)
13
13
  end
14
14
 
15
15
  setup do
@@ -17,10 +17,13 @@ module Elasticsearch
17
17
  mappings: {
18
18
  d: {
19
19
  properties: {
20
- title: { type: 'string' },
21
- title_suggest: {
22
- type: 'completion',
23
- payloads: true
20
+ title: { type: 'text' },
21
+ suggest: {
22
+ type: 'object',
23
+ properties: {
24
+ title: { type: 'completion' },
25
+ payload: { type: 'object', enabled: false }
26
+ }
24
27
  }
25
28
  }
26
29
  }
@@ -29,32 +32,50 @@ module Elasticsearch
29
32
 
30
33
  @client.index index: 'test', type: 'd', id: '1', body: {
31
34
  title: 'One',
32
- title_suggest: { input: ['one', 'uno', 'jedna'] }, output: 'ONE', payload: { id: '1' } }
35
+ suggest: {
36
+ title: { input: ['one', 'uno', 'jedna'] },
37
+ payload: { id: '1' }
38
+ }
39
+ }
33
40
  @client.index index: 'test', type: 'd', id: '2', body: {
34
41
  title: 'Two',
35
- title_suggest: { input: ['two', 'due', 'dvě'] }, output: 'TWO', payload: { id: '2' } }
42
+ suggest: {
43
+ title: { input: ['two', 'due', 'dvě'] },
44
+ payload: { id: '2' }
45
+ }
46
+ }
36
47
  @client.index index: 'test', type: 'd', id: '3', body: {
37
48
  title: 'Three',
38
- title_suggest: { input: ['three', 'tres', 'tři'] }, output: 'THREE', payload: { id: '3' } }
49
+ suggest: {
50
+ title: { input: ['three', 'tres', 'tři'] },
51
+ payload: { id: '3' }
52
+ }
53
+ }
39
54
  @client.indices.refresh index: 'test'
40
55
  end
41
56
 
42
57
  should "return suggestions" do
43
58
  s = search do
44
- suggest :title, text: 't', completion: { field: 'title_suggest' }
59
+ suggest :title, text: 't', completion: { field: 'suggest.title' }
45
60
  end
46
61
 
47
62
  response = @client.search index: 'test', body: s.to_hash
48
- assert_equal 4, response['suggest']['title'][0]['options'].size
63
+
64
+ assert_equal 2, response['suggest']['title'][0]['options'].size
65
+
66
+ assert_same_elements %w[2 3], response['suggest']['title'][0]['options'].map { |d| d['_source']['suggest']['payload']['id'] }
49
67
  end
50
68
 
51
69
  should "return a single suggestion" do
52
70
  s = search do
53
- suggest :title, text: 'th', completion: { field: 'title_suggest' }
71
+ suggest :title, text: 'th', completion: { field: 'suggest.title' }
54
72
  end
55
73
 
56
74
  response = @client.search index: 'test', body: s.to_hash
75
+
57
76
  assert_equal 1, response['suggest']['title'][0]['options'].size
77
+
78
+ assert_same_elements %w[3], response['suggest']['title'][0]['options'].map { |d| d['_source']['suggest']['payload']['id'] }
58
79
  end
59
80
  end
60
81
  end
@@ -34,7 +34,7 @@ module Elasticsearch
34
34
 
35
35
  context "The Search class" do
36
36
  startup do
37
- Elasticsearch::Extensions::Test::Cluster.start(nodes: 1) if ENV['SERVER'] and not Elasticsearch::Extensions::Test::Cluster.running?
37
+ Elasticsearch::Extensions::Test::Cluster.start(number_of_nodes: 1) if ENV['SERVER'] and not Elasticsearch::Extensions::Test::Cluster.running?(number_of_nodes: 1)
38
38
  end
39
39
 
40
40
  setup do
@@ -7,12 +7,15 @@ end
7
7
 
8
8
  at_exit { Elasticsearch::Test::IntegrationTestCase.__run_at_exit_hooks }
9
9
 
10
- require 'test/unit'
10
+ require 'minitest/autorun'
11
11
  require 'shoulda-context'
12
12
  require 'mocha/setup'
13
13
 
14
14
  require 'minitest/reporters'
15
15
  Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
16
+ # Minitest::Reporters.use! [ Minitest::Reporters::SpecReporter.new,
17
+ # Minitest::Reporters::JUnitReporter.new,
18
+ # Minitest::Reporters::HtmlReporter.new ]
16
19
 
17
20
  require 'elasticsearch'
18
21
  require 'elasticsearch/extensions/test/cluster'
@@ -22,13 +25,29 @@ require 'elasticsearch/dsl'
22
25
 
23
26
  module Elasticsearch
24
27
  module Test
25
- class IntegrationTestCase < ::Test::Unit::TestCase
28
+ module Assertions
29
+ def assert_nothing_raised(*)
30
+ yield
31
+ end
32
+ end
33
+
34
+ class UnitTestCase < ::Minitest::Test
35
+ include Assertions
36
+ alias_method :assert_not_nil, :refute_nil
37
+ alias_method :assert_raise, :assert_raises
38
+ end
39
+
40
+ class IntegrationTestCase < ::Minitest::Test
41
+ include Assertions
42
+ alias_method :assert_not_nil, :refute_nil
43
+ alias_method :assert_raise, :assert_raises
44
+
26
45
  include Elasticsearch::Extensions::Test
27
46
  extend StartupShutdown
28
47
 
29
48
  startup do
30
- Cluster.start(nodes: 1) if ENV['SERVER'] \
31
- && ! Elasticsearch::Extensions::Test::Cluster.running?
49
+ Cluster.start(number_of_nodes: 1) if ENV['SERVER'] \
50
+ && ! Elasticsearch::Extensions::Test::Cluster.running?(number_of_nodes: 1)
32
51
  end
33
52
 
34
53
  shutdown do
@@ -51,7 +70,7 @@ module Elasticsearch
51
70
  ANSI.ansi(severity[0] + ' ', color, :faint) + ANSI.ansi(msg, :white, :faint) + "\n"
52
71
  end
53
72
 
54
- @client = Elasticsearch::Client.new host: "localhost:#{@port}", logger: @logger
73
+ @client = Elasticsearch::Client.new host: "localhost:#{@port}", logger: (ENV['QUIET'] ? nil : @logger)
55
74
  @version = @client.info['version']['number']
56
75
  end
57
76
 
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class AvgTest < ::Test::Unit::TestCase
6
+ class AvgTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "Avg agg" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class CardinalityTest < ::Test::Unit::TestCase
6
+ class CardinalityTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "Cardinality agg" do
@@ -12,21 +12,21 @@ module Elasticsearch
12
12
  should "be converted to a Hash" do
13
13
  assert_equal({ cardinality: {} }, subject.to_hash)
14
14
  end
15
-
15
+
16
16
  should "have option methods" do
17
17
  subject = Cardinality.new :foo
18
-
18
+
19
19
  subject.field 'bar'
20
20
  subject.precision_threshold 'bar'
21
21
  subject.rehash 'bar'
22
22
  subject.script 'bar'
23
23
  subject.params 'bar'
24
-
24
+
25
25
  assert_equal %w[ field params precision_threshold rehash script ],
26
26
  subject.to_hash[:cardinality][:foo].keys.map(&:to_s).sort
27
27
  assert_equal 'bar', subject.to_hash[:cardinality][:foo][:field]
28
28
  end
29
-
29
+
30
30
  should "take a block" do
31
31
  subject = Cardinality.new :foo do
32
32
  field 'bar'
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class ChildrenTest < ::Test::Unit::TestCase
6
+ class ChildrenTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "Children aggregation" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class DateHistogramTest < ::Test::Unit::TestCase
6
+ class DateHistogramTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "DateHistogram aggregation" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class DateRangeTest < ::Test::Unit::TestCase
6
+ class DateRangeTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "DateRange aggregation" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class ExtendedStatsTest < ::Test::Unit::TestCase
6
+ class ExtendedStatsTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "ExtendedStats agg" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class FilterTest < ::Test::Unit::TestCase
6
+ class FilterTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "Filter agg" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class FiltersTest < ::Test::Unit::TestCase
6
+ class FiltersTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "Filters agg" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class GeoBoundsTest < ::Test::Unit::TestCase
6
+ class GeoBoundsTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "GeoBounds agg" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class GeoDistanceTest < ::Test::Unit::TestCase
6
+ class GeoDistanceTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "GeoDistance aggregation" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class GeohashGridTest < ::Test::Unit::TestCase
6
+ class GeohashGridTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "GeohashGrid aggregation" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class GlobalTest < ::Test::Unit::TestCase
6
+ class GlobalTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "Global agg" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class HistogramTest < ::Test::Unit::TestCase
6
+ class HistogramTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "Histogram aggregation" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class IpRangeTest < ::Test::Unit::TestCase
6
+ class IpRangeTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "IpRange aggregation" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class MaxTest < ::Test::Unit::TestCase
6
+ class MaxTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "Max agg" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class MinTest < ::Test::Unit::TestCase
6
+ class MinTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "Min agg" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class MissingTest < ::Test::Unit::TestCase
6
+ class MissingTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "Missing aggregation" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class NestedTest < ::Test::Unit::TestCase
6
+ class NestedTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "Nested aggregation" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class PercentileRanksTest < ::Test::Unit::TestCase
6
+ class PercentileRanksTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "PercentileRanks agg" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class PercentilesTest < ::Test::Unit::TestCase
6
+ class PercentilesTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "Percentiles agg" do
@@ -3,7 +3,7 @@ require 'test_helper'
3
3
  module Elasticsearch
4
4
  module Test
5
5
  module Aggregations
6
- class AvgBucketTest < ::Test::Unit::TestCase
6
+ class AvgBucketTest < ::Elasticsearch::Test::UnitTestCase
7
7
  include Elasticsearch::DSL::Search::Aggregations
8
8
 
9
9
  context "Avg Bucket agg" do