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
@@ -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,9 +1,22 @@
|
|
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
|
7
|
-
VERSION = "0.1.
|
20
|
+
VERSION = "0.1.10"
|
8
21
|
end
|
9
22
|
end
|
@@ -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 'spec_helper'
|
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
|
require 'spec_helper'
|
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
|
require 'spec_helper'
|
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
|
require 'spec_helper'
|
6
19
|
|
@@ -1,30 +1,39 @@
|
|
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 'spec_helper'
|
6
19
|
|
7
20
|
describe Elasticsearch::DSL::Search::Aggregations::DateHistogram do
|
8
|
-
|
9
21
|
let(:search) do
|
10
22
|
described_class.new
|
11
23
|
end
|
12
24
|
|
13
25
|
describe '#to_hash' do
|
14
|
-
|
15
26
|
it 'can be converted to a hash' do
|
16
27
|
expect(search.to_hash).to eq(date_histogram: {})
|
17
28
|
end
|
18
29
|
end
|
19
30
|
|
20
31
|
context 'when options methods are called' do
|
21
|
-
|
22
32
|
let(:search) do
|
23
33
|
described_class.new(:foo)
|
24
34
|
end
|
25
35
|
|
26
36
|
describe '#field' do
|
27
|
-
|
28
37
|
before do
|
29
38
|
search.field('bar')
|
30
39
|
end
|
@@ -34,19 +43,27 @@ describe Elasticsearch::DSL::Search::Aggregations::DateHistogram do
|
|
34
43
|
end
|
35
44
|
end
|
36
45
|
|
37
|
-
describe '#
|
46
|
+
describe '#fixed_interval' do
|
47
|
+
before do
|
48
|
+
search.fixed_interval('bar')
|
49
|
+
end
|
38
50
|
|
51
|
+
it 'applies the option' do
|
52
|
+
expect(search.to_hash[:date_histogram][:foo][:fixed_interval]).to eq('bar')
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe '#calendar_interval' do
|
39
57
|
before do
|
40
|
-
search.
|
58
|
+
search.calendar_interval('bar')
|
41
59
|
end
|
42
60
|
|
43
61
|
it 'applies the option' do
|
44
|
-
expect(search.to_hash[:date_histogram][:foo][:
|
62
|
+
expect(search.to_hash[:date_histogram][:foo][:calendar_interval]).to eq('bar')
|
45
63
|
end
|
46
64
|
end
|
47
65
|
|
48
66
|
describe '#pre_zone' do
|
49
|
-
|
50
67
|
before do
|
51
68
|
search.pre_zone('bar')
|
52
69
|
end
|
@@ -57,7 +74,6 @@ describe Elasticsearch::DSL::Search::Aggregations::DateHistogram do
|
|
57
74
|
end
|
58
75
|
|
59
76
|
describe '#post_zone' do
|
60
|
-
|
61
77
|
before do
|
62
78
|
search.post_zone('bar')
|
63
79
|
end
|
@@ -68,7 +84,6 @@ describe Elasticsearch::DSL::Search::Aggregations::DateHistogram do
|
|
68
84
|
end
|
69
85
|
|
70
86
|
describe '#time_zone' do
|
71
|
-
|
72
87
|
before do
|
73
88
|
search.time_zone('bar')
|
74
89
|
end
|
@@ -79,7 +94,6 @@ describe Elasticsearch::DSL::Search::Aggregations::DateHistogram do
|
|
79
94
|
end
|
80
95
|
|
81
96
|
describe '#pre_zone_adjust_large_interval' do
|
82
|
-
|
83
97
|
before do
|
84
98
|
search.pre_zone_adjust_large_interval('bar')
|
85
99
|
end
|
@@ -90,7 +104,6 @@ describe Elasticsearch::DSL::Search::Aggregations::DateHistogram do
|
|
90
104
|
end
|
91
105
|
|
92
106
|
describe '#pre_offest' do
|
93
|
-
|
94
107
|
before do
|
95
108
|
search.pre_offset('bar')
|
96
109
|
end
|
@@ -101,7 +114,6 @@ describe Elasticsearch::DSL::Search::Aggregations::DateHistogram do
|
|
101
114
|
end
|
102
115
|
|
103
116
|
describe '#post_offset' do
|
104
|
-
|
105
117
|
before do
|
106
118
|
search.post_offset('bar')
|
107
119
|
end
|
@@ -112,7 +124,6 @@ describe Elasticsearch::DSL::Search::Aggregations::DateHistogram do
|
|
112
124
|
end
|
113
125
|
|
114
126
|
describe '#format' do
|
115
|
-
|
116
127
|
before do
|
117
128
|
search.format('bar')
|
118
129
|
end
|
@@ -123,7 +134,6 @@ describe Elasticsearch::DSL::Search::Aggregations::DateHistogram do
|
|
123
134
|
end
|
124
135
|
|
125
136
|
describe '#min_doc_count' do
|
126
|
-
|
127
137
|
before do
|
128
138
|
search.min_doc_count('bar')
|
129
139
|
end
|
@@ -134,7 +144,6 @@ describe Elasticsearch::DSL::Search::Aggregations::DateHistogram do
|
|
134
144
|
end
|
135
145
|
|
136
146
|
describe '#extended_bounds' do
|
137
|
-
|
138
147
|
before do
|
139
148
|
search.extended_bounds('bar')
|
140
149
|
end
|
@@ -145,7 +154,6 @@ describe Elasticsearch::DSL::Search::Aggregations::DateHistogram do
|
|
145
154
|
end
|
146
155
|
|
147
156
|
describe '#order' do
|
148
|
-
|
149
157
|
before do
|
150
158
|
search.order('bar')
|
151
159
|
end
|
@@ -157,19 +165,17 @@ describe Elasticsearch::DSL::Search::Aggregations::DateHistogram do
|
|
157
165
|
end
|
158
166
|
|
159
167
|
describe '#initialize' do
|
160
|
-
|
161
168
|
context 'when a block is provided' do
|
162
|
-
|
163
169
|
let(:search) do
|
164
170
|
described_class.new do
|
165
171
|
field 'bar'
|
166
|
-
|
172
|
+
calendar_interval 'day'
|
167
173
|
format 'yyyy-MM-dd'
|
168
174
|
end
|
169
175
|
end
|
170
176
|
|
171
177
|
it 'executes the block' do
|
172
|
-
expect(search.to_hash).to eq(date_histogram: { field: 'bar',
|
178
|
+
expect(search.to_hash).to eq(date_histogram: { field: 'bar', calendar_interval: 'day', format: 'yyyy-MM-dd' })
|
173
179
|
end
|
174
180
|
end
|
175
181
|
end
|
@@ -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 'spec_helper'
|
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
|
require 'spec_helper'
|
6
19
|
|