File: fa61e3481b1f889b3bd4253866bb1c6b.asciidoc

package info (click to toggle)
python-elasticsearch 9.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 22,728 kB
  • sloc: python: 104,053; makefile: 151; javascript: 75
file content (96 lines) | stat: -rw-r--r-- 3,254 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// This file is autogenerated, DO NOT EDIT
// aggregations/pipeline/bucket-correlation-aggregation.asciidoc:103

[source, python]
----
resp = client.search(
    index="correlate_latency",
    size="0",
    filter_path="aggregations",
    aggs={
        "buckets": {
            "terms": {
                "field": "version",
                "size": 2
            },
            "aggs": {
                "latency_ranges": {
                    "range": {
                        "field": "latency",
                        "ranges": [
                            {
                                "to": 0
                            },
                            {
                                "from": 0,
                                "to": 105
                            },
                            {
                                "from": 105,
                                "to": 225
                            },
                            {
                                "from": 225,
                                "to": 445
                            },
                            {
                                "from": 445,
                                "to": 665
                            },
                            {
                                "from": 665,
                                "to": 885
                            },
                            {
                                "from": 885,
                                "to": 1115
                            },
                            {
                                "from": 1115,
                                "to": 1335
                            },
                            {
                                "from": 1335,
                                "to": 1555
                            },
                            {
                                "from": 1555,
                                "to": 1775
                            },
                            {
                                "from": 1775
                            }
                        ]
                    }
                },
                "bucket_correlation": {
                    "bucket_correlation": {
                        "buckets_path": "latency_ranges>_count",
                        "function": {
                            "count_correlation": {
                                "indicator": {
                                    "expectations": [
                                        0,
                                        52.5,
                                        165,
                                        335,
                                        555,
                                        775,
                                        1000,
                                        1225,
                                        1445,
                                        1665,
                                        1775
                                    ],
                                    "doc_count": 200
                                }
                            }
                        }
                    }
                }
            }
        }
    },
)
print(resp)
----