elasticsearch-dsl 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (274) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +27 -14
  3. data/README.md +3 -4
  4. data/Rakefile +16 -19
  5. data/elasticsearch-dsl.gemspec +39 -25
  6. data/lib/elasticsearch-dsl.rb +16 -3
  7. data/lib/elasticsearch/dsl.rb +16 -3
  8. data/lib/elasticsearch/dsl/search.rb +16 -3
  9. data/lib/elasticsearch/dsl/search/aggregation.rb +16 -3
  10. data/lib/elasticsearch/dsl/search/aggregations/avg.rb +16 -3
  11. data/lib/elasticsearch/dsl/search/aggregations/cardinality.rb +16 -3
  12. data/lib/elasticsearch/dsl/search/aggregations/children.rb +16 -3
  13. data/lib/elasticsearch/dsl/search/aggregations/composite.rb +16 -3
  14. data/lib/elasticsearch/dsl/search/aggregations/date_histogram.rb +21 -7
  15. data/lib/elasticsearch/dsl/search/aggregations/date_range.rb +16 -3
  16. data/lib/elasticsearch/dsl/search/aggregations/extended_stats.rb +16 -3
  17. data/lib/elasticsearch/dsl/search/aggregations/filter.rb +16 -3
  18. data/lib/elasticsearch/dsl/search/aggregations/filters.rb +16 -3
  19. data/lib/elasticsearch/dsl/search/aggregations/geo_bounds.rb +16 -3
  20. data/lib/elasticsearch/dsl/search/aggregations/geo_distance.rb +16 -3
  21. data/lib/elasticsearch/dsl/search/aggregations/geohash_grid.rb +16 -3
  22. data/lib/elasticsearch/dsl/search/aggregations/global.rb +16 -3
  23. data/lib/elasticsearch/dsl/search/aggregations/histogram.rb +16 -3
  24. data/lib/elasticsearch/dsl/search/aggregations/ip_range.rb +16 -3
  25. data/lib/elasticsearch/dsl/search/aggregations/max.rb +16 -3
  26. data/lib/elasticsearch/dsl/search/aggregations/min.rb +16 -3
  27. data/lib/elasticsearch/dsl/search/aggregations/missing.rb +16 -3
  28. data/lib/elasticsearch/dsl/search/aggregations/nested.rb +16 -3
  29. data/lib/elasticsearch/dsl/search/aggregations/percentile_ranks.rb +16 -3
  30. data/lib/elasticsearch/dsl/search/aggregations/percentiles.rb +16 -3
  31. data/lib/elasticsearch/dsl/search/aggregations/pipeline/avg_bucket.rb +16 -3
  32. data/lib/elasticsearch/dsl/search/aggregations/pipeline/bucket_script.rb +16 -3
  33. data/lib/elasticsearch/dsl/search/aggregations/pipeline/bucket_selector.rb +16 -3
  34. data/lib/elasticsearch/dsl/search/aggregations/pipeline/bucket_sort.rb +16 -3
  35. data/lib/elasticsearch/dsl/search/aggregations/pipeline/cumulative_sum.rb +16 -3
  36. data/lib/elasticsearch/dsl/search/aggregations/pipeline/derivative.rb +16 -3
  37. data/lib/elasticsearch/dsl/search/aggregations/pipeline/extended_stats_bucket.rb +16 -3
  38. data/lib/elasticsearch/dsl/search/aggregations/pipeline/max_bucket.rb +16 -3
  39. data/lib/elasticsearch/dsl/search/aggregations/pipeline/min_bucket.rb +16 -3
  40. data/lib/elasticsearch/dsl/search/aggregations/pipeline/moving_avg.rb +16 -3
  41. data/lib/elasticsearch/dsl/search/aggregations/pipeline/percentiles_bucket.rb +16 -3
  42. data/lib/elasticsearch/dsl/search/aggregations/pipeline/serial_diff.rb +16 -3
  43. data/lib/elasticsearch/dsl/search/aggregations/pipeline/stats_bucket.rb +16 -3
  44. data/lib/elasticsearch/dsl/search/aggregations/pipeline/sum_bucket.rb +16 -3
  45. data/lib/elasticsearch/dsl/search/aggregations/range.rb +16 -3
  46. data/lib/elasticsearch/dsl/search/aggregations/reverse_nested.rb +16 -3
  47. data/lib/elasticsearch/dsl/search/aggregations/scripted_metric.rb +16 -3
  48. data/lib/elasticsearch/dsl/search/aggregations/significant_terms.rb +16 -3
  49. data/lib/elasticsearch/dsl/search/aggregations/significant_text.rb +16 -3
  50. data/lib/elasticsearch/dsl/search/aggregations/stats.rb +16 -3
  51. data/lib/elasticsearch/dsl/search/aggregations/sum.rb +16 -3
  52. data/lib/elasticsearch/dsl/search/aggregations/terms.rb +16 -3
  53. data/lib/elasticsearch/dsl/search/aggregations/top_hits.rb +16 -3
  54. data/lib/elasticsearch/dsl/search/aggregations/value_count.rb +16 -3
  55. data/lib/elasticsearch/dsl/search/base_aggregation_component.rb +16 -3
  56. data/lib/elasticsearch/dsl/search/base_component.rb +16 -3
  57. data/lib/elasticsearch/dsl/search/base_compound_filter_component.rb +16 -3
  58. data/lib/elasticsearch/dsl/search/collapse.rb +16 -3
  59. data/lib/elasticsearch/dsl/search/filter.rb +16 -3
  60. data/lib/elasticsearch/dsl/search/filters/and.rb +16 -3
  61. data/lib/elasticsearch/dsl/search/filters/bool.rb +18 -3
  62. data/lib/elasticsearch/dsl/search/filters/exists.rb +16 -3
  63. data/lib/elasticsearch/dsl/search/filters/geo_bounding_box.rb +16 -3
  64. data/lib/elasticsearch/dsl/search/filters/geo_distance.rb +16 -3
  65. data/lib/elasticsearch/dsl/search/filters/geo_distance_range.rb +16 -3
  66. data/lib/elasticsearch/dsl/search/filters/geo_polygon.rb +16 -3
  67. data/lib/elasticsearch/dsl/search/filters/geo_shape.rb +16 -3
  68. data/lib/elasticsearch/dsl/search/filters/geohash_cell.rb +16 -3
  69. data/lib/elasticsearch/dsl/search/filters/has_child.rb +16 -3
  70. data/lib/elasticsearch/dsl/search/filters/has_parent.rb +16 -3
  71. data/lib/elasticsearch/dsl/search/filters/ids.rb +16 -3
  72. data/lib/elasticsearch/dsl/search/filters/indices.rb +16 -3
  73. data/lib/elasticsearch/dsl/search/filters/limit.rb +16 -3
  74. data/lib/elasticsearch/dsl/search/filters/match_all.rb +16 -3
  75. data/lib/elasticsearch/dsl/search/filters/missing.rb +16 -3
  76. data/lib/elasticsearch/dsl/search/filters/nested.rb +16 -3
  77. data/lib/elasticsearch/dsl/search/filters/not.rb +16 -3
  78. data/lib/elasticsearch/dsl/search/filters/or.rb +16 -3
  79. data/lib/elasticsearch/dsl/search/filters/prefix.rb +16 -3
  80. data/lib/elasticsearch/dsl/search/filters/query.rb +16 -3
  81. data/lib/elasticsearch/dsl/search/filters/range.rb +16 -3
  82. data/lib/elasticsearch/dsl/search/filters/regexp.rb +16 -3
  83. data/lib/elasticsearch/dsl/search/filters/script.rb +16 -3
  84. data/lib/elasticsearch/dsl/search/filters/term.rb +16 -3
  85. data/lib/elasticsearch/dsl/search/filters/terms.rb +16 -3
  86. data/lib/elasticsearch/dsl/search/filters/type.rb +16 -3
  87. data/lib/elasticsearch/dsl/search/highlight.rb +16 -3
  88. data/lib/elasticsearch/dsl/search/options.rb +16 -3
  89. data/lib/elasticsearch/dsl/search/queries/bool.rb +16 -3
  90. data/lib/elasticsearch/dsl/search/queries/boosting.rb +16 -3
  91. data/lib/elasticsearch/dsl/search/queries/common.rb +16 -3
  92. data/lib/elasticsearch/dsl/search/queries/constant_score.rb +16 -3
  93. data/lib/elasticsearch/dsl/search/queries/dis_max.rb +16 -3
  94. data/lib/elasticsearch/dsl/search/queries/exists.rb +16 -3
  95. data/lib/elasticsearch/dsl/search/queries/filtered.rb +16 -3
  96. data/lib/elasticsearch/dsl/search/queries/function_score.rb +16 -3
  97. data/lib/elasticsearch/dsl/search/queries/fuzzy.rb +16 -3
  98. data/lib/elasticsearch/dsl/search/queries/fuzzy_like_this.rb +16 -3
  99. data/lib/elasticsearch/dsl/search/queries/fuzzy_like_this_field.rb +16 -3
  100. data/lib/elasticsearch/dsl/search/queries/geo_shape.rb +16 -3
  101. data/lib/elasticsearch/dsl/search/queries/has_child.rb +16 -3
  102. data/lib/elasticsearch/dsl/search/queries/has_parent.rb +16 -3
  103. data/lib/elasticsearch/dsl/search/queries/ids.rb +16 -3
  104. data/lib/elasticsearch/dsl/search/queries/indices.rb +16 -3
  105. data/lib/elasticsearch/dsl/search/queries/inner_hits.rb +16 -3
  106. data/lib/elasticsearch/dsl/search/queries/match.rb +16 -3
  107. data/lib/elasticsearch/dsl/search/queries/match_all.rb +16 -3
  108. data/lib/elasticsearch/dsl/search/queries/match_phrase.rb +16 -3
  109. data/lib/elasticsearch/dsl/search/queries/match_phrase_prefix.rb +16 -3
  110. data/lib/elasticsearch/dsl/search/queries/more_like_this.rb +16 -3
  111. data/lib/elasticsearch/dsl/search/queries/multi_match.rb +16 -3
  112. data/lib/elasticsearch/dsl/search/queries/nested.rb +16 -3
  113. data/lib/elasticsearch/dsl/search/queries/prefix.rb +16 -3
  114. data/lib/elasticsearch/dsl/search/queries/query_string.rb +17 -6
  115. data/lib/elasticsearch/dsl/search/queries/range.rb +16 -3
  116. data/lib/elasticsearch/dsl/search/queries/regexp.rb +16 -3
  117. data/lib/elasticsearch/dsl/search/queries/simple_query_string.rb +16 -3
  118. data/lib/elasticsearch/dsl/search/queries/span_first.rb +16 -3
  119. data/lib/elasticsearch/dsl/search/queries/span_multi.rb +16 -3
  120. data/lib/elasticsearch/dsl/search/queries/span_near.rb +16 -3
  121. data/lib/elasticsearch/dsl/search/queries/span_not.rb +16 -3
  122. data/lib/elasticsearch/dsl/search/queries/span_or.rb +16 -3
  123. data/lib/elasticsearch/dsl/search/queries/span_term.rb +16 -3
  124. data/lib/elasticsearch/dsl/search/queries/template.rb +16 -3
  125. data/lib/elasticsearch/dsl/search/queries/term.rb +16 -3
  126. data/lib/elasticsearch/dsl/search/queries/terms.rb +16 -3
  127. data/lib/elasticsearch/dsl/search/queries/top_children.rb +16 -3
  128. data/lib/elasticsearch/dsl/search/queries/wildcard.rb +16 -3
  129. data/lib/elasticsearch/dsl/search/query.rb +16 -3
  130. data/lib/elasticsearch/dsl/search/sort.rb +16 -3
  131. data/lib/elasticsearch/dsl/search/suggest.rb +16 -3
  132. data/lib/elasticsearch/dsl/utils.rb +16 -3
  133. data/lib/elasticsearch/dsl/version.rb +17 -4
  134. data/spec/elasticsearch/dsl/search/aggregations/avg_spec.rb +16 -3
  135. data/spec/elasticsearch/dsl/search/aggregations/cardinality_spec.rb +16 -3
  136. data/spec/elasticsearch/dsl/search/aggregations/children_spec.rb +16 -3
  137. data/spec/elasticsearch/dsl/search/aggregations/composite_spec.rb +16 -3
  138. data/spec/elasticsearch/dsl/search/aggregations/date_histogram_spec.rb +30 -24
  139. data/spec/elasticsearch/dsl/search/aggregations/date_range_spec.rb +16 -3
  140. data/spec/elasticsearch/dsl/search/aggregations/extended_stats_spec.rb +16 -3
  141. data/spec/elasticsearch/dsl/search/aggregations/filter_spec.rb +16 -3
  142. data/spec/elasticsearch/dsl/search/aggregations/filters_spec.rb +16 -3
  143. data/spec/elasticsearch/dsl/search/aggregations/geo_bounds_spec.rb +16 -3
  144. data/spec/elasticsearch/dsl/search/aggregations/geo_distance_spec.rb +16 -3
  145. data/spec/elasticsearch/dsl/search/aggregations/geo_grid_spec.rb +16 -3
  146. data/spec/elasticsearch/dsl/search/aggregations/global_spec.rb +16 -3
  147. data/spec/elasticsearch/dsl/search/aggregations/historgram_spec.rb +16 -3
  148. data/spec/elasticsearch/dsl/search/aggregations/ip_range_spec.rb +16 -3
  149. data/spec/elasticsearch/dsl/search/aggregations/max_spec.rb +16 -3
  150. data/spec/elasticsearch/dsl/search/aggregations/min_spec.rb +16 -3
  151. data/spec/elasticsearch/dsl/search/aggregations/missing_spec.rb +16 -3
  152. data/spec/elasticsearch/dsl/search/aggregations/nested_spec.rb +16 -3
  153. data/spec/elasticsearch/dsl/search/aggregations/percentile_ranks_spec.rb +16 -3
  154. data/spec/elasticsearch/dsl/search/aggregations/percentiles_spec.rb +16 -3
  155. data/spec/elasticsearch/dsl/search/aggregations/pipeline/avg_bucket_spec.rb +16 -3
  156. data/spec/elasticsearch/dsl/search/aggregations/pipeline/bucket_script_spec.rb +16 -3
  157. data/spec/elasticsearch/dsl/search/aggregations/pipeline/bucket_selector_spec.rb +16 -3
  158. data/spec/elasticsearch/dsl/search/aggregations/pipeline/bucket_sort_spec.rb +16 -3
  159. data/spec/elasticsearch/dsl/search/aggregations/pipeline/cumulative_sum_spec.rb +16 -3
  160. data/spec/elasticsearch/dsl/search/aggregations/pipeline/derivative_spec.rb +16 -3
  161. data/spec/elasticsearch/dsl/search/aggregations/pipeline/extended_stats_bucket_spec.rb +16 -3
  162. data/spec/elasticsearch/dsl/search/aggregations/pipeline/max_bucket_spec.rb +16 -3
  163. data/spec/elasticsearch/dsl/search/aggregations/pipeline/min_bucket_spec.rb +16 -3
  164. data/spec/elasticsearch/dsl/search/aggregations/pipeline/moving_avg_test_spec.rb +16 -3
  165. data/spec/elasticsearch/dsl/search/aggregations/pipeline/percentiles_bucket_spec.rb +16 -3
  166. data/spec/elasticsearch/dsl/search/aggregations/pipeline/serial_diff_spec.rb +16 -3
  167. data/spec/elasticsearch/dsl/search/aggregations/pipeline/stats_bucket_spec.rb +16 -3
  168. data/spec/elasticsearch/dsl/search/aggregations/pipeline/sum_bucket_spec.rb +16 -3
  169. data/spec/elasticsearch/dsl/search/aggregations/range_spec.rb +16 -3
  170. data/spec/elasticsearch/dsl/search/aggregations/reverse_nested_spec.rb +16 -3
  171. data/spec/elasticsearch/dsl/search/aggregations/scripted_metric_spec.rb +16 -3
  172. data/spec/elasticsearch/dsl/search/aggregations/significant_terms_spec.rb +16 -3
  173. data/spec/elasticsearch/dsl/search/aggregations/significant_text_spec.rb +16 -3
  174. data/spec/elasticsearch/dsl/search/aggregations/stats_spec.rb +16 -3
  175. data/spec/elasticsearch/dsl/search/aggregations/sum_spec.rb +16 -3
  176. data/spec/elasticsearch/dsl/search/aggregations/terms_spec.rb +16 -3
  177. data/spec/elasticsearch/dsl/search/aggregations/top_hits_spec.rb +16 -3
  178. data/spec/elasticsearch/dsl/search/aggregations/value_count_spec.rb +16 -3
  179. data/spec/elasticsearch/dsl/search/collapse_spec.rb +16 -3
  180. data/spec/elasticsearch/dsl/search/filters/and_spec.rb +16 -3
  181. data/spec/elasticsearch/dsl/search/filters/bool_spec.rb +30 -3
  182. data/spec/elasticsearch/dsl/search/filters/exists_spec.rb +16 -3
  183. data/spec/elasticsearch/dsl/search/filters/geo_bounding_box_spec.rb +16 -3
  184. data/spec/elasticsearch/dsl/search/filters/geo_distance_range_spec.rb +16 -3
  185. data/spec/elasticsearch/dsl/search/filters/geo_distance_spec.rb +16 -3
  186. data/spec/elasticsearch/dsl/search/filters/geo_polygon_spec.rb +16 -3
  187. data/spec/elasticsearch/dsl/search/filters/geo_shape_spec.rb +16 -3
  188. data/spec/elasticsearch/dsl/search/filters/geohash_cell_spec.rb +16 -3
  189. data/spec/elasticsearch/dsl/search/filters/has_child_spec.rb +16 -3
  190. data/spec/elasticsearch/dsl/search/filters/has_parent_spec.rb +16 -3
  191. data/spec/elasticsearch/dsl/search/filters/ids_spec.rb +16 -3
  192. data/spec/elasticsearch/dsl/search/filters/indices_spec.rb +16 -3
  193. data/spec/elasticsearch/dsl/search/filters/limit_spec.rb +16 -3
  194. data/spec/elasticsearch/dsl/search/filters/match_all_spec.rb +16 -3
  195. data/spec/elasticsearch/dsl/search/filters/missing_spec.rb +16 -3
  196. data/spec/elasticsearch/dsl/search/filters/nested_spec.rb +16 -3
  197. data/spec/elasticsearch/dsl/search/filters/not_spec.rb +16 -3
  198. data/spec/elasticsearch/dsl/search/filters/or_spec.rb +16 -3
  199. data/spec/elasticsearch/dsl/search/filters/prefix_spec.rb +16 -3
  200. data/spec/elasticsearch/dsl/search/filters/query_spec.rb +16 -3
  201. data/spec/elasticsearch/dsl/search/filters/range_spec.rb +16 -3
  202. data/spec/elasticsearch/dsl/search/filters/regexp_spec.rb +16 -3
  203. data/spec/elasticsearch/dsl/search/filters/script_spec.rb +16 -3
  204. data/spec/elasticsearch/dsl/search/filters/term_spec.rb +16 -3
  205. data/spec/elasticsearch/dsl/search/filters/terms_spec.rb +16 -3
  206. data/spec/elasticsearch/dsl/search/filters/type_spec.rb +16 -3
  207. data/spec/elasticsearch/dsl/search/queries/bool_spec.rb +16 -3
  208. data/spec/elasticsearch/dsl/search/queries/boosting_spec.rb +16 -3
  209. data/spec/elasticsearch/dsl/search/queries/common_spec.rb +16 -3
  210. data/spec/elasticsearch/dsl/search/queries/constant_score_spec.rb +16 -3
  211. data/spec/elasticsearch/dsl/search/queries/dis_max_spec.rb +16 -3
  212. data/spec/elasticsearch/dsl/search/queries/exists_spec.rb +16 -3
  213. data/spec/elasticsearch/dsl/search/queries/filtered_spec.rb +16 -3
  214. data/spec/elasticsearch/dsl/search/queries/function_score_spec.rb +16 -3
  215. data/spec/elasticsearch/dsl/search/queries/fuzzy_like_this_field_spec.rb +16 -3
  216. data/spec/elasticsearch/dsl/search/queries/fuzzy_like_this_spec.rb +16 -3
  217. data/spec/elasticsearch/dsl/search/queries/fuzzy_spec.rb +16 -3
  218. data/spec/elasticsearch/dsl/search/queries/geo_shape_spec.rb +16 -3
  219. data/spec/elasticsearch/dsl/search/queries/has_child_spec.rb +16 -3
  220. data/spec/elasticsearch/dsl/search/queries/has_parent_spec.rb +16 -3
  221. data/spec/elasticsearch/dsl/search/queries/ids_spec.rb +16 -3
  222. data/spec/elasticsearch/dsl/search/queries/indices_spec.rb +16 -3
  223. data/spec/elasticsearch/dsl/search/queries/inner_hits_spec.rb +16 -3
  224. data/spec/elasticsearch/dsl/search/queries/match_all_spec.rb +16 -3
  225. data/spec/elasticsearch/dsl/search/queries/match_phrase_prefix_spec.rb +16 -3
  226. data/spec/elasticsearch/dsl/search/queries/match_phrase_spec.rb +16 -3
  227. data/spec/elasticsearch/dsl/search/queries/match_spec.rb +16 -3
  228. data/spec/elasticsearch/dsl/search/queries/more_like_this_spec.rb +16 -3
  229. data/spec/elasticsearch/dsl/search/queries/multi_match_spec.rb +16 -3
  230. data/spec/elasticsearch/dsl/search/queries/nested_spec.rb +16 -3
  231. data/spec/elasticsearch/dsl/search/queries/prefix_spec.rb +16 -3
  232. data/spec/elasticsearch/dsl/search/queries/query_string_spec.rb +21 -12
  233. data/spec/elasticsearch/dsl/search/queries/range_spec.rb +16 -3
  234. data/spec/elasticsearch/dsl/search/queries/regexp_spec.rb +16 -3
  235. data/spec/elasticsearch/dsl/search/queries/simple_query_string_spec.rb +16 -3
  236. data/spec/elasticsearch/dsl/search/queries/span_first_spec.rb +16 -3
  237. data/spec/elasticsearch/dsl/search/queries/span_multi_spec.rb +16 -3
  238. data/spec/elasticsearch/dsl/search/queries/span_near_spec.rb +16 -3
  239. data/spec/elasticsearch/dsl/search/queries/span_not_spec.rb +16 -3
  240. data/spec/elasticsearch/dsl/search/queries/span_or_spec.rb +16 -3
  241. data/spec/elasticsearch/dsl/search/queries/span_term_spec.rb +16 -3
  242. data/spec/elasticsearch/dsl/search/queries/template_spec.rb +16 -3
  243. data/spec/elasticsearch/dsl/search/queries/term_spec.rb +16 -3
  244. data/spec/elasticsearch/dsl/search/queries/terms_spec.rb +16 -3
  245. data/spec/elasticsearch/dsl/search/queries/top_children_spec.rb +16 -3
  246. data/spec/elasticsearch/dsl/search/queries/wildcard_spec.rb +16 -3
  247. data/spec/elasticsearch/dsl/search_spec.rb +16 -3
  248. data/spec/spec_helper.rb +16 -3
  249. data/test/integration/search_aggregation_children_test.rb +16 -7
  250. data/test/integration/search_aggregation_geo_test.rb +16 -7
  251. data/test/integration/search_aggregation_nested_test.rb +16 -7
  252. data/test/integration/search_aggregations_test.rb +16 -3
  253. data/test/integration/search_filters_test.rb +16 -7
  254. data/test/integration/search_options_test.rb +16 -3
  255. data/test/integration/search_query_test.rb +16 -7
  256. data/test/integration/search_size_from_test.rb +16 -3
  257. data/test/integration/search_sort_test.rb +16 -7
  258. data/test/integration/search_suggest_test.rb +16 -7
  259. data/test/integration/search_test.rb +16 -7
  260. data/test/test_helper.rb +21 -26
  261. data/test/unit/dsl_test.rb +16 -3
  262. data/test/unit/search_aggregation_test.rb +16 -3
  263. data/test/unit/search_base_aggregation_component_test.rb +16 -3
  264. data/test/unit/search_base_component_test.rb +16 -3
  265. data/test/unit/search_filter_test.rb +16 -3
  266. data/test/unit/search_highlight_test.rb +16 -3
  267. data/test/unit/search_options_test.rb +16 -3
  268. data/test/unit/search_query_test.rb +16 -3
  269. data/test/unit/search_size_from_test.rb +16 -3
  270. data/test/unit/search_sort_test.rb +16 -3
  271. data/test/unit/search_suggest_test.rb +16 -3
  272. data/test/unit/search_test.rb +16 -3
  273. data/test/unit/utils_test.rb +16 -3
  274. metadata +39 -49
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c06f16111c1a5a433b67c1b7b3ea96fc1da1b7b06ef3d33a32c36d01a5f6313
4
- data.tar.gz: bef717306ff360a26a3b9c3c84b5beb9821452404547f0af834c383c4a0d1d9f
3
+ metadata.gz: 234aa22eb94aac071f4f0571f186bd09e843b08478615d91ff11af3432b6b759
4
+ data.tar.gz: b5436da15abb910df19a69c8c2a89a370270cf3c4cbc1e7762a35f34dee5ee18
5
5
  SHA512:
6
- metadata.gz: b0b7a267f4c43c0cf9f095132f46a54c7d2a6e515e8868e343e003245e27e1e086ae6fb44314eb42c8ee93a4454385c2dbf7ec158bd224f510c908440452cea9
7
- data.tar.gz: 0ba1b777aa2145ec8b1aa5aafa7ab2e06a90374c461d26dea09653d8878321af6687c0bd6171ebdcf9fc7f3380500a784e2fa947c2a7ab673b1232c7c50da22a
6
+ metadata.gz: c5ea60a8de268b8632d510e92f457fb24ce5e3028432aec3c1946ba60e8f5c0db0db8c282789b5027d6812b394c851e058b58670f8e2d7a8402c36c8528b6f61
7
+ data.tar.gz: 63a0d7248a59b37076d82d6d44a0ef2535f5e0dd3918df7d42c347e717217b00bcc9f454e33af239f2034dbe90ec3239924c23f5081eab25c99c786a63f84aff
data/Gemfile CHANGED
@@ -1,29 +1,42 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  source 'https://rubygems.org'
6
19
 
7
20
  # Specify your gem's dependencies in elasticsearch-dsl.gemspec
8
21
  gemspec
9
22
 
10
- if File.exist? File.expand_path("../../elasticsearch/elasticsearch.gemspec", __FILE__)
11
- gem 'elasticsearch', :path => File.expand_path("../../elasticsearch", __FILE__), :require => false
23
+ if File.exist? File.expand_path('../../elasticsearch/elasticsearch.gemspec', __FILE__)
24
+ gem 'elasticsearch', path: File.expand_path('../../elasticsearch', __FILE__), require: false
12
25
  end
13
26
 
14
- if File.exist? File.expand_path("../../elasticsearch-transport", __FILE__)
15
- gem 'elasticsearch-transport', :path => File.expand_path("../../elasticsearch-transport", __FILE__), :require => true
27
+ if File.exist? File.expand_path('../../elasticsearch-transport', __FILE__)
28
+ gem 'elasticsearch-transport', path: File.expand_path('../../elasticsearch-transport', __FILE__), require: true
16
29
  end
17
30
 
18
- if File.exist? File.expand_path("../../elasticsearch-api", __FILE__)
19
- gem 'elasticsearch-api', :path => File.expand_path("../../elasticsearch-api", __FILE__), :require => false
20
- end
21
-
22
- if File.exist? File.expand_path("../../elasticsearch-extensions", __FILE__)
23
- gem 'elasticsearch-extensions', :path => File.expand_path("../../elasticsearch-extensions", __FILE__), :require => false
31
+ if File.exist? File.expand_path('../../elasticsearch-api', __FILE__)
32
+ gem 'elasticsearch-api', path: File.expand_path('../../elasticsearch-api', __FILE__), require: false
24
33
  end
25
34
 
26
35
  group :development do
27
36
  gem 'rspec'
28
- gem 'pry-nav'
37
+ if defined?(JRUBY_VERSION)
38
+ gem 'pry-nav'
39
+ else
40
+ gem 'pry-byebug'
41
+ end
29
42
  end
data/README.md CHANGED
@@ -100,12 +100,11 @@ which are translated to Hashes, and ultimately, JSON, the language of Elasticsea
100
100
 
101
101
  All Elasticsearch DSL features are supported, namely:
102
102
 
103
- * [Queries](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-queries.html)
104
- * [Filters](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-filters.html)
103
+ * [Queries and Filter context](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html)
105
104
  * [Aggregations](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html)
106
105
  * [Suggestions](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html)
107
- * [Sorting](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html)
108
- * [Pagination](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html)
106
+ * [Sorting](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-sort)
107
+ * [Pagination](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-from-size)
109
108
  * [Options](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html) (source filtering, highlighting, etc)
110
109
 
111
110
  An example of a complex search definition is below.
data/Rakefile CHANGED
@@ -1,6 +1,19 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  require "bundler/gem_tasks"
6
19
 
@@ -42,22 +55,6 @@ namespace :test do
42
55
  Rake::Task['test:unit'].invoke
43
56
  Rake::Task['test:integration'].invoke
44
57
  end
45
-
46
- namespace :cluster do
47
- desc "Start Elasticsearch nodes for tests"
48
- task :start do
49
- $LOAD_PATH << File.expand_path('../../elasticsearch-transport/lib', __FILE__) << File.expand_path('../test', __FILE__)
50
- require 'elasticsearch/extensions/test/cluster'
51
- Elasticsearch::Extensions::Test::Cluster.start
52
- end
53
-
54
- desc "Stop Elasticsearch nodes for tests"
55
- task :stop do
56
- $LOAD_PATH << File.expand_path('../../elasticsearch-transport/lib', __FILE__) << File.expand_path('../test', __FILE__)
57
- require 'elasticsearch/extensions/test/cluster'
58
- Elasticsearch::Extensions::Test::Cluster.stop
59
- end
60
- end
61
58
  end
62
59
 
63
60
  # ----- Documentation tasks ---------------------------------------------------
@@ -1,6 +1,19 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  # coding: utf-8
6
19
  lib = File.expand_path('../lib', __FILE__)
@@ -8,41 +21,42 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
8
21
  require 'elasticsearch/dsl/version'
9
22
 
10
23
  Gem::Specification.new do |s|
11
- s.name = "elasticsearch-dsl"
24
+ s.name = 'elasticsearch-dsl'
12
25
  s.version = Elasticsearch::DSL::VERSION
13
- s.authors = ["Karel Minarik"]
14
- s.email = ["karel.minarik@elasticsearch.com"]
26
+ s.authors = ['Karel Minarik']
27
+ s.email = ['karel.minarik@elasticsearch.com']
15
28
  s.description = %q{A Ruby DSL builder for Elasticsearch}
16
29
  s.summary = s.description
17
- s.homepage = "https://github.com/elasticsearch/elasticsearch-ruby/tree/master/elasticsearch-dsl"
18
- s.license = "Apache-2.0"
19
-
30
+ s.homepage = 'https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/index.html'
31
+ s.license = 'Apache-2.0'
32
+ s.metadata = {
33
+ 'homepage_uri' => 'https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/index.html',
34
+ 'changelog_uri' => 'https://github.com/elastic/elasticsearch-ruby/blob/master/CHANGELOG.md',
35
+ 'source_code_uri' => 'https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch-dsl',
36
+ 'bug_tracker_uri' => 'https://github.com/elastic/elasticsearch-ruby/issues'
37
+ }
20
38
  s.files = `git ls-files`.split($/)
21
39
  s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
22
40
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
23
- s.require_paths = ["lib"]
41
+ s.require_paths = ['lib']
24
42
 
25
- s.extra_rdoc_files = [ "README.md", "LICENSE.txt" ]
26
- s.rdoc_options = [ "--charset=UTF-8" ]
43
+ s.extra_rdoc_files = [ 'README.md', 'LICENSE.txt' ]
44
+ s.rdoc_options = [ '--charset=UTF-8' ]
27
45
 
28
- s.required_ruby_version = '>= 1.9'
46
+ s.required_ruby_version = '>= 2.5'
29
47
 
30
- s.add_development_dependency "bundler"
31
- s.add_development_dependency "rake", "~> 11.1"
48
+ s.add_development_dependency 'bundler'
49
+ s.add_development_dependency 'rake', '~> 12.3'
32
50
 
33
- s.add_development_dependency "elasticsearch"
34
- s.add_development_dependency "elasticsearch-extensions"
51
+ s.add_development_dependency 'elasticsearch'
35
52
 
36
- s.add_development_dependency 'shoulda-context'
37
- s.add_development_dependency 'mocha'
53
+ s.add_development_dependency 'cane'
38
54
  s.add_development_dependency 'minitest', '~> 5'
39
55
  s.add_development_dependency 'minitest-reporters', '~> 1'
56
+ s.add_development_dependency 'mocha'
57
+ s.add_development_dependency 'pry'
58
+ s.add_development_dependency 'shoulda-context'
40
59
  s.add_development_dependency 'simplecov'
60
+ s.add_development_dependency 'test-unit', '~> 2'
41
61
  s.add_development_dependency 'yard'
42
- s.add_development_dependency 'cane'
43
- s.add_development_dependency 'pry'
44
-
45
- if defined?(RUBY_VERSION) && RUBY_VERSION > '2.2'
46
- s.add_development_dependency "test-unit", '~> 2'
47
- end
48
62
  end
@@ -1,5 +1,18 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  require 'elasticsearch/dsl'
@@ -1,6 +1,19 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  require 'elasticsearch/dsl/version'
6
19
 
@@ -1,6 +1,19 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  module Elasticsearch
6
19
  module DSL
@@ -1,6 +1,19 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  module Elasticsearch
6
19
  module DSL
@@ -1,6 +1,19 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  module Elasticsearch
6
19
  module DSL
@@ -1,6 +1,19 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  module Elasticsearch
6
19
  module DSL
@@ -1,6 +1,19 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  module Elasticsearch
6
19
  module DSL
@@ -1,6 +1,19 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  module Elasticsearch
6
19
  module DSL
@@ -1,6 +1,19 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  module Elasticsearch
6
19
  module DSL
@@ -13,9 +26,9 @@ module Elasticsearch
13
26
  #
14
27
  # search do
15
28
  # aggregation :daily do
16
- # field 'published_at'
17
- # interval 'day'
18
- # format 'yyyy-MM-dd'
29
+ # field 'published_at'
30
+ # calendar_interval 'day'
31
+ # format 'yyyy-MM-dd'
19
32
  # end
20
33
  # end
21
34
  #
@@ -25,7 +38,8 @@ module Elasticsearch
25
38
  include BaseAggregationComponent
26
39
 
27
40
  option_method :field
28
- option_method :interval
41
+ option_method :fixed_interval
42
+ option_method :calendar_interval
29
43
  option_method :pre_zone
30
44
  option_method :post_zone
31
45
  option_method :time_zone