aboutsummaryrefslogtreecommitdiffstats
path: root/tests/files
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-12-17 13:08:39 -0800
committerBryan Newbold <bnewbold@archive.org>2020-12-17 13:08:39 -0800
commit8a4376fb2a3404ffaf58b6946f1086bdc793aea5 (patch)
treef040718917e9ac22017cf0598db1f0aabc6ce1b1 /tests/files
parent3940c481760fbe2c9299fb52513e7717b8e3c214 (diff)
downloades-public-proxy-8a4376fb2a3404ffaf58b6946f1086bdc793aea5.tar.gz
es-public-proxy-8a4376fb2a3404ffaf58b6946f1086bdc793aea5.zip
add support for date_histogram and composite aggregations
Diffstat (limited to 'tests/files')
-rw-r--r--tests/files/search/GET_search_agg_composite_date_histogram.txt13
-rw-r--r--tests/files/search/GET_search_agg_composite_early.txt15
-rw-r--r--tests/files/search/GET_search_agg_composite_histogram.txt13
-rw-r--r--tests/files/search/GET_search_agg_composite_missing.txt13
-rw-r--r--tests/files/search/GET_search_agg_composite_mixed.txt15
-rw-r--r--tests/files/search/GET_search_agg_composite_order.txt14
-rw-r--r--tests/files/search/GET_search_agg_composite_paginate.txt16
-rw-r--r--tests/files/search/GET_search_agg_composite_sub.txt19
-rw-r--r--tests/files/search/GET_search_agg_composite_terms.txt13
-rw-r--r--tests/files/search/GET_search_agg_date_histogram_offset.txt12
-rw-r--r--tests/files/search/GET_search_agg_date_histogram_timezone.txt12
-rw-r--r--tests/files/search/POST_search_agg_date_histogram.txt11
-rw-r--r--tests/files/search/POST_search_agg_date_histogram_fixed_interval.txt11
-rw-r--r--tests/files/search/POST_search_agg_date_histogram_format.txt12
-rw-r--r--tests/files/search/POST_search_agg_date_histogram_keyed.txt13
-rw-r--r--tests/files/search/POST_search_agg_date_histogram_missing.txt12
-rw-r--r--tests/files/search/POST_search_agg_filter_simple.txt (renamed from tests/files/search/GET_search_agg_filter_simple.txt)0
-rw-r--r--tests/files/search/POST_search_agg_histogram.txt (renamed from tests/files/search/GET_search_agg_histogram.txt)0
-rw-r--r--tests/files/search/POST_search_agg_max.txt (renamed from tests/files/search/GET_search_agg_max.txt)0
19 files changed, 214 insertions, 0 deletions
diff --git a/tests/files/search/GET_search_agg_composite_date_histogram.txt b/tests/files/search/GET_search_agg_composite_date_histogram.txt
new file mode 100644
index 0000000..4fb10ce
--- /dev/null
+++ b/tests/files/search/GET_search_agg_composite_date_histogram.txt
@@ -0,0 +1,13 @@
+GET /some-index/_search
+{
+ "size": 0,
+ "aggs": {
+ "my_buckets": {
+ "composite": {
+ "sources": [
+ { "date": { "date_histogram": { "field": "timestamp", "calendar_interval": "1d" } } }
+ ]
+ }
+ }
+ }
+}
diff --git a/tests/files/search/GET_search_agg_composite_early.txt b/tests/files/search/GET_search_agg_composite_early.txt
new file mode 100644
index 0000000..c0ab7cd
--- /dev/null
+++ b/tests/files/search/GET_search_agg_composite_early.txt
@@ -0,0 +1,15 @@
+GET /some-index/_search
+{
+ "size": 0,
+ "track_total_hits": false,
+ "aggs": {
+ "my_buckets": {
+ "composite": {
+ "sources": [
+ { "user_name": { "terms": { "field": "user_name" } } },
+ { "date": { "date_histogram": { "field": "timestamp", "calendar_interval": "1d", "order": "desc" } } }
+ ]
+ }
+ }
+ }
+}
diff --git a/tests/files/search/GET_search_agg_composite_histogram.txt b/tests/files/search/GET_search_agg_composite_histogram.txt
new file mode 100644
index 0000000..3bace14
--- /dev/null
+++ b/tests/files/search/GET_search_agg_composite_histogram.txt
@@ -0,0 +1,13 @@
+GET /some-index/_search
+{
+ "size": 0,
+ "aggs": {
+ "my_buckets": {
+ "composite": {
+ "sources": [
+ { "histo": { "histogram": { "field": "price", "interval": 5 } } }
+ ]
+ }
+ }
+ }
+}
diff --git a/tests/files/search/GET_search_agg_composite_missing.txt b/tests/files/search/GET_search_agg_composite_missing.txt
new file mode 100644
index 0000000..c46e190
--- /dev/null
+++ b/tests/files/search/GET_search_agg_composite_missing.txt
@@ -0,0 +1,13 @@
+GET /some-index/_search
+{
+ "size": 0,
+ "aggs": {
+ "my_buckets": {
+ "composite": {
+ "sources": [
+ { "product_name": { "terms": { "field": "product", "missing_bucket": true } } }
+ ]
+ }
+ }
+ }
+}
diff --git a/tests/files/search/GET_search_agg_composite_mixed.txt b/tests/files/search/GET_search_agg_composite_mixed.txt
new file mode 100644
index 0000000..4649d8c
--- /dev/null
+++ b/tests/files/search/GET_search_agg_composite_mixed.txt
@@ -0,0 +1,15 @@
+GET /some-index/_search
+{
+ "size": 0,
+ "aggs": {
+ "my_buckets": {
+ "composite": {
+ "sources": [
+ { "shop": { "terms": { "field": "shop" } } },
+ { "product": { "terms": { "field": "product" } } },
+ { "date": { "date_histogram": { "field": "timestamp", "calendar_interval": "1d" } } }
+ ]
+ }
+ }
+ }
+}
diff --git a/tests/files/search/GET_search_agg_composite_order.txt b/tests/files/search/GET_search_agg_composite_order.txt
new file mode 100644
index 0000000..20a42e1
--- /dev/null
+++ b/tests/files/search/GET_search_agg_composite_order.txt
@@ -0,0 +1,14 @@
+GET /some-index/_search
+{
+ "size": 0,
+ "aggs": {
+ "my_buckets": {
+ "composite": {
+ "sources": [
+ { "date": { "date_histogram": { "field": "timestamp", "calendar_interval": "1d", "order": "desc" } } },
+ { "product": { "terms": { "field": "product", "order": "asc" } } }
+ ]
+ }
+ }
+ }
+}
diff --git a/tests/files/search/GET_search_agg_composite_paginate.txt b/tests/files/search/GET_search_agg_composite_paginate.txt
new file mode 100644
index 0000000..53f3a5c
--- /dev/null
+++ b/tests/files/search/GET_search_agg_composite_paginate.txt
@@ -0,0 +1,16 @@
+GET /some-index/_search
+{
+ "size": 0,
+ "aggs": {
+ "my_buckets": {
+ "composite": {
+ "size": 2,
+ "sources": [
+ { "date": { "date_histogram": { "field": "timestamp", "calendar_interval": "1d", "order": "desc" } } },
+ { "product": { "terms": { "field": "product", "order": "asc" } } }
+ ],
+ "after": { "date": 1494288000000, "product": "mad max" }
+ }
+ }
+ }
+}
diff --git a/tests/files/search/GET_search_agg_composite_sub.txt b/tests/files/search/GET_search_agg_composite_sub.txt
new file mode 100644
index 0000000..757183f
--- /dev/null
+++ b/tests/files/search/GET_search_agg_composite_sub.txt
@@ -0,0 +1,19 @@
+GET /some-index/_search
+{
+ "size": 0,
+ "aggs": {
+ "my_buckets": {
+ "composite": {
+ "sources": [
+ { "date": { "date_histogram": { "field": "timestamp", "calendar_interval": "1d", "order": "desc" } } },
+ { "product": { "terms": { "field": "product" } } }
+ ]
+ },
+ "aggregations": {
+ "the_avg": {
+ "avg": { "field": "price" }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/files/search/GET_search_agg_composite_terms.txt b/tests/files/search/GET_search_agg_composite_terms.txt
new file mode 100644
index 0000000..403fc2c
--- /dev/null
+++ b/tests/files/search/GET_search_agg_composite_terms.txt
@@ -0,0 +1,13 @@
+GET /some-index/_search
+{
+ "size": 0,
+ "aggs": {
+ "my_buckets": {
+ "composite": {
+ "sources": [
+ { "product": { "terms": { "field": "product" } } }
+ ]
+ }
+ }
+ }
+}
diff --git a/tests/files/search/GET_search_agg_date_histogram_offset.txt b/tests/files/search/GET_search_agg_date_histogram_offset.txt
new file mode 100644
index 0000000..0a613de
--- /dev/null
+++ b/tests/files/search/GET_search_agg_date_histogram_offset.txt
@@ -0,0 +1,12 @@
+GET /my-index-000001/_search?size=0
+{
+ "aggs": {
+ "by_day": {
+ "date_histogram": {
+ "field": "date",
+ "calendar_interval": "day",
+ "offset": "+6h"
+ }
+ }
+ }
+}
diff --git a/tests/files/search/GET_search_agg_date_histogram_timezone.txt b/tests/files/search/GET_search_agg_date_histogram_timezone.txt
new file mode 100644
index 0000000..0bf992e
--- /dev/null
+++ b/tests/files/search/GET_search_agg_date_histogram_timezone.txt
@@ -0,0 +1,12 @@
+GET /my-index-000001/_search?size=0
+{
+ "aggs": {
+ "by_day": {
+ "date_histogram": {
+ "field": "date",
+ "calendar_interval": "day",
+ "time_zone": "-01:00"
+ }
+ }
+ }
+}
diff --git a/tests/files/search/POST_search_agg_date_histogram.txt b/tests/files/search/POST_search_agg_date_histogram.txt
new file mode 100644
index 0000000..731af13
--- /dev/null
+++ b/tests/files/search/POST_search_agg_date_histogram.txt
@@ -0,0 +1,11 @@
+POST /sales/_search?size=0
+{
+ "aggs": {
+ "sales_over_time": {
+ "date_histogram": {
+ "field": "date",
+ "calendar_interval": "month"
+ }
+ }
+ }
+}
diff --git a/tests/files/search/POST_search_agg_date_histogram_fixed_interval.txt b/tests/files/search/POST_search_agg_date_histogram_fixed_interval.txt
new file mode 100644
index 0000000..e98ad70
--- /dev/null
+++ b/tests/files/search/POST_search_agg_date_histogram_fixed_interval.txt
@@ -0,0 +1,11 @@
+POST /sales/_search?size=0
+{
+ "aggs": {
+ "sales_over_time": {
+ "date_histogram": {
+ "field": "date",
+ "fixed_interval": "30d"
+ }
+ }
+ }
+}
diff --git a/tests/files/search/POST_search_agg_date_histogram_format.txt b/tests/files/search/POST_search_agg_date_histogram_format.txt
new file mode 100644
index 0000000..1063343
--- /dev/null
+++ b/tests/files/search/POST_search_agg_date_histogram_format.txt
@@ -0,0 +1,12 @@
+POST /sales/_search?size=0
+{
+ "aggs": {
+ "sales_over_time": {
+ "date_histogram": {
+ "field": "date",
+ "calendar_interval": "1M",
+ "format": "yyyy-MM-dd"
+ }
+ }
+ }
+}
diff --git a/tests/files/search/POST_search_agg_date_histogram_keyed.txt b/tests/files/search/POST_search_agg_date_histogram_keyed.txt
new file mode 100644
index 0000000..7994b72
--- /dev/null
+++ b/tests/files/search/POST_search_agg_date_histogram_keyed.txt
@@ -0,0 +1,13 @@
+POST /sales/_search?size=0
+{
+ "aggs": {
+ "sales_over_time": {
+ "date_histogram": {
+ "field": "date",
+ "calendar_interval": "1M",
+ "format": "yyyy-MM-dd",
+ "keyed": true
+ }
+ }
+ }
+}
diff --git a/tests/files/search/POST_search_agg_date_histogram_missing.txt b/tests/files/search/POST_search_agg_date_histogram_missing.txt
new file mode 100644
index 0000000..3c9b95c
--- /dev/null
+++ b/tests/files/search/POST_search_agg_date_histogram_missing.txt
@@ -0,0 +1,12 @@
+POST /sales/_search?size=0
+{
+ "aggs": {
+ "sale_date": {
+ "date_histogram": {
+ "field": "date",
+ "calendar_interval": "year",
+ "missing": "2000/01/01"
+ }
+ }
+ }
+}
diff --git a/tests/files/search/GET_search_agg_filter_simple.txt b/tests/files/search/POST_search_agg_filter_simple.txt
index 71a9777..71a9777 100644
--- a/tests/files/search/GET_search_agg_filter_simple.txt
+++ b/tests/files/search/POST_search_agg_filter_simple.txt
diff --git a/tests/files/search/GET_search_agg_histogram.txt b/tests/files/search/POST_search_agg_histogram.txt
index 4689ad1..4689ad1 100644
--- a/tests/files/search/GET_search_agg_histogram.txt
+++ b/tests/files/search/POST_search_agg_histogram.txt
diff --git a/tests/files/search/GET_search_agg_max.txt b/tests/files/search/POST_search_agg_max.txt
index 1377afc..1377afc 100644
--- a/tests/files/search/GET_search_agg_max.txt
+++ b/tests/files/search/POST_search_agg_max.txt