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.
- checksums.yaml +4 -4
- data/Gemfile +27 -14
- data/README.md +3 -4
- data/Rakefile +16 -19
- data/elasticsearch-dsl.gemspec +39 -25
- data/lib/elasticsearch-dsl.rb +16 -3
- data/lib/elasticsearch/dsl.rb +16 -3
- data/lib/elasticsearch/dsl/search.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregation.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/avg.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/cardinality.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/children.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/composite.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/date_histogram.rb +21 -7
- data/lib/elasticsearch/dsl/search/aggregations/date_range.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/extended_stats.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/filter.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/filters.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/geo_bounds.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/geo_distance.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/geohash_grid.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/global.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/histogram.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/ip_range.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/max.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/min.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/missing.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/nested.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/percentile_ranks.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/percentiles.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/pipeline/avg_bucket.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/pipeline/bucket_script.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/pipeline/bucket_selector.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/pipeline/bucket_sort.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/pipeline/cumulative_sum.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/pipeline/derivative.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/pipeline/extended_stats_bucket.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/pipeline/max_bucket.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/pipeline/min_bucket.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/pipeline/moving_avg.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/pipeline/percentiles_bucket.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/pipeline/serial_diff.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/pipeline/stats_bucket.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/pipeline/sum_bucket.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/range.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/reverse_nested.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/scripted_metric.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/significant_terms.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/significant_text.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/stats.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/sum.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/terms.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/top_hits.rb +16 -3
- data/lib/elasticsearch/dsl/search/aggregations/value_count.rb +16 -3
- data/lib/elasticsearch/dsl/search/base_aggregation_component.rb +16 -3
- data/lib/elasticsearch/dsl/search/base_component.rb +16 -3
- data/lib/elasticsearch/dsl/search/base_compound_filter_component.rb +16 -3
- data/lib/elasticsearch/dsl/search/collapse.rb +16 -3
- data/lib/elasticsearch/dsl/search/filter.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/and.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/bool.rb +18 -3
- data/lib/elasticsearch/dsl/search/filters/exists.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/geo_bounding_box.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/geo_distance.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/geo_distance_range.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/geo_polygon.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/geo_shape.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/geohash_cell.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/has_child.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/has_parent.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/ids.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/indices.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/limit.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/match_all.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/missing.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/nested.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/not.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/or.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/prefix.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/query.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/range.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/regexp.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/script.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/term.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/terms.rb +16 -3
- data/lib/elasticsearch/dsl/search/filters/type.rb +16 -3
- data/lib/elasticsearch/dsl/search/highlight.rb +16 -3
- data/lib/elasticsearch/dsl/search/options.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/bool.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/boosting.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/common.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/constant_score.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/dis_max.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/exists.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/filtered.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/function_score.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/fuzzy.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/fuzzy_like_this.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/fuzzy_like_this_field.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/geo_shape.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/has_child.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/has_parent.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/ids.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/indices.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/inner_hits.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/match.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/match_all.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/match_phrase.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/match_phrase_prefix.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/more_like_this.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/multi_match.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/nested.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/prefix.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/query_string.rb +17 -6
- data/lib/elasticsearch/dsl/search/queries/range.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/regexp.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/simple_query_string.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/span_first.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/span_multi.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/span_near.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/span_not.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/span_or.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/span_term.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/template.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/term.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/terms.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/top_children.rb +16 -3
- data/lib/elasticsearch/dsl/search/queries/wildcard.rb +16 -3
- data/lib/elasticsearch/dsl/search/query.rb +16 -3
- data/lib/elasticsearch/dsl/search/sort.rb +16 -3
- data/lib/elasticsearch/dsl/search/suggest.rb +16 -3
- data/lib/elasticsearch/dsl/utils.rb +16 -3
- data/lib/elasticsearch/dsl/version.rb +17 -4
- data/spec/elasticsearch/dsl/search/aggregations/avg_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/cardinality_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/children_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/composite_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/date_histogram_spec.rb +30 -24
- data/spec/elasticsearch/dsl/search/aggregations/date_range_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/extended_stats_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/filter_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/filters_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/geo_bounds_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/geo_distance_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/geo_grid_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/global_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/historgram_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/ip_range_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/max_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/min_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/missing_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/nested_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/percentile_ranks_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/percentiles_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/pipeline/avg_bucket_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/pipeline/bucket_script_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/pipeline/bucket_selector_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/pipeline/bucket_sort_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/pipeline/cumulative_sum_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/pipeline/derivative_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/pipeline/extended_stats_bucket_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/pipeline/max_bucket_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/pipeline/min_bucket_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/pipeline/moving_avg_test_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/pipeline/percentiles_bucket_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/pipeline/serial_diff_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/pipeline/stats_bucket_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/pipeline/sum_bucket_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/range_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/reverse_nested_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/scripted_metric_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/significant_terms_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/significant_text_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/stats_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/sum_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/terms_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/top_hits_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/aggregations/value_count_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/collapse_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/and_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/bool_spec.rb +30 -3
- data/spec/elasticsearch/dsl/search/filters/exists_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/geo_bounding_box_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/geo_distance_range_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/geo_distance_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/geo_polygon_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/geo_shape_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/geohash_cell_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/has_child_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/has_parent_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/ids_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/indices_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/limit_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/match_all_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/missing_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/nested_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/not_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/or_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/prefix_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/query_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/range_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/regexp_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/script_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/term_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/terms_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/filters/type_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/bool_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/boosting_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/common_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/constant_score_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/dis_max_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/exists_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/filtered_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/function_score_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/fuzzy_like_this_field_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/fuzzy_like_this_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/fuzzy_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/geo_shape_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/has_child_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/has_parent_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/ids_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/indices_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/inner_hits_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/match_all_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/match_phrase_prefix_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/match_phrase_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/match_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/more_like_this_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/multi_match_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/nested_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/prefix_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/query_string_spec.rb +21 -12
- data/spec/elasticsearch/dsl/search/queries/range_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/regexp_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/simple_query_string_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/span_first_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/span_multi_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/span_near_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/span_not_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/span_or_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/span_term_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/template_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/term_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/terms_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/top_children_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search/queries/wildcard_spec.rb +16 -3
- data/spec/elasticsearch/dsl/search_spec.rb +16 -3
- data/spec/spec_helper.rb +16 -3
- data/test/integration/search_aggregation_children_test.rb +16 -7
- data/test/integration/search_aggregation_geo_test.rb +16 -7
- data/test/integration/search_aggregation_nested_test.rb +16 -7
- data/test/integration/search_aggregations_test.rb +16 -3
- data/test/integration/search_filters_test.rb +16 -7
- data/test/integration/search_options_test.rb +16 -3
- data/test/integration/search_query_test.rb +16 -7
- data/test/integration/search_size_from_test.rb +16 -3
- data/test/integration/search_sort_test.rb +16 -7
- data/test/integration/search_suggest_test.rb +16 -7
- data/test/integration/search_test.rb +16 -7
- data/test/test_helper.rb +21 -26
- data/test/unit/dsl_test.rb +16 -3
- data/test/unit/search_aggregation_test.rb +16 -3
- data/test/unit/search_base_aggregation_component_test.rb +16 -3
- data/test/unit/search_base_component_test.rb +16 -3
- data/test/unit/search_filter_test.rb +16 -3
- data/test/unit/search_highlight_test.rb +16 -3
- data/test/unit/search_options_test.rb +16 -3
- data/test/unit/search_query_test.rb +16 -3
- data/test/unit/search_size_from_test.rb +16 -3
- data/test/unit/search_sort_test.rb +16 -3
- data/test/unit/search_suggest_test.rb +16 -3
- data/test/unit/search_test.rb +16 -3
- data/test/unit/utils_test.rb +16 -3
- metadata +39 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 234aa22eb94aac071f4f0571f186bd09e843b08478615d91ff11af3432b6b759
|
4
|
+
data.tar.gz: b5436da15abb910df19a69c8c2a89a370270cf3c4cbc1e7762a35f34dee5ee18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
2
|
-
#
|
3
|
-
#
|
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(
|
11
|
-
gem 'elasticsearch', :
|
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(
|
15
|
-
gem 'elasticsearch-transport', :
|
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(
|
19
|
-
gem 'elasticsearch-api', :
|
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
|
-
|
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-
|
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-
|
108
|
-
* [Pagination](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size
|
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
|
2
|
-
#
|
3
|
-
#
|
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 ---------------------------------------------------
|
data/elasticsearch-dsl.gemspec
CHANGED
@@ -1,6 +1,19 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
2
|
-
#
|
3
|
-
#
|
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 =
|
24
|
+
s.name = 'elasticsearch-dsl'
|
12
25
|
s.version = Elasticsearch::DSL::VERSION
|
13
|
-
s.authors = [
|
14
|
-
s.email = [
|
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 =
|
18
|
-
s.license =
|
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 = [
|
41
|
+
s.require_paths = ['lib']
|
24
42
|
|
25
|
-
s.extra_rdoc_files = [
|
26
|
-
s.rdoc_options = [
|
43
|
+
s.extra_rdoc_files = [ 'README.md', 'LICENSE.txt' ]
|
44
|
+
s.rdoc_options = [ '--charset=UTF-8' ]
|
27
45
|
|
28
|
-
s.required_ruby_version = '>=
|
46
|
+
s.required_ruby_version = '>= 2.5'
|
29
47
|
|
30
|
-
s.add_development_dependency
|
31
|
-
s.add_development_dependency
|
48
|
+
s.add_development_dependency 'bundler'
|
49
|
+
s.add_development_dependency 'rake', '~> 12.3'
|
32
50
|
|
33
|
-
s.add_development_dependency
|
34
|
-
s.add_development_dependency "elasticsearch-extensions"
|
51
|
+
s.add_development_dependency 'elasticsearch'
|
35
52
|
|
36
|
-
s.add_development_dependency '
|
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
|
data/lib/elasticsearch-dsl.rb
CHANGED
@@ -1,5 +1,18 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
2
|
-
#
|
3
|
-
#
|
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'
|
data/lib/elasticsearch/dsl.rb
CHANGED
@@ -1,6 +1,19 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more
|
2
|
-
#
|
3
|
-
#
|
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
|
2
|
-
#
|
3
|
-
#
|
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
|
2
|
-
#
|
3
|
-
#
|
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
|
2
|
-
#
|
3
|
-
#
|
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
|
2
|
-
#
|
3
|
-
#
|
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
|
2
|
-
#
|
3
|
-
#
|
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
|
2
|
-
#
|
3
|
-
#
|
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
|
2
|
-
#
|
3
|
-
#
|
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
|
17
|
-
#
|
18
|
-
# format
|
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 :
|
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
|