You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/plugins/mapper-size.asciidoc
+19-6Lines changed: 19 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -45,36 +45,49 @@ GET my_index/_search
45
45
{
46
46
"query": {
47
47
"range": {
48
-
"_size": { <1>
48
+
"_size": { <1>
49
49
"gt": 10
50
50
}
51
51
}
52
52
},
53
53
"aggs": {
54
54
"sizes": {
55
55
"terms": {
56
-
"field": "_size", <2>
56
+
"field": "_size", <2>
57
57
"size": 10
58
58
}
59
59
}
60
60
},
61
61
"sort": [
62
62
{
63
-
"_size": { <3>
63
+
"_size": { <3>
64
64
"order": "desc"
65
65
}
66
66
}
67
67
],
68
68
"script_fields": {
69
69
"size": {
70
-
"script": "doc['_size']" <4>
70
+
"script": "doc['_size']" <4>
71
71
}
72
-
}
72
+
},
73
+
"docvalue_fields": [
74
+
{
75
+
"field": "_size" <5>
76
+
}
77
+
]
73
78
}
74
79
--------------------------
75
80
// TEST[continued]
76
81
77
82
<1> Querying on the `_size` field
78
83
<2> Aggregating on the `_size` field
79
84
<3> Sorting on the `_size` field
80
-
<4> Accessing the `_size` field in scripts (inline scripts must be modules-security-scripting.html#enable-dynamic-scripting[enabled] for this example to work)
0 commit comments