Skip to content

Commit 0017884

Browse files
committed
Clarify that IP range data can be specified in CIDR notation. (#31374)
(cherry picked from commit 3f5ebb8)
1 parent 1f8e3a4 commit 0017884

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/reference/mapping/types/range.asciidoc

+24
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,30 @@ This query produces a similar result:
168168
--------------------------------------------------
169169
// TESTRESPONSE[s/"took": 13/"took" : $body.took/]
170170

171+
[[ip-range]]
172+
==== IP Range
173+
174+
In addition to the range format above, IP ranges can be provided in
175+
https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation[CIDR] notation:
176+
177+
[source,js]
178+
--------------------------------------------------
179+
PUT range_index/_mapping/_doc
180+
{
181+
"properties": {
182+
"ip_whitelist": {
183+
"type": "ip_range"
184+
}
185+
}
186+
}
187+
188+
PUT range_index/_doc/2
189+
{
190+
"ip_whitelist" : "192.168.0.0/16"
191+
}
192+
--------------------------------------------------
193+
// CONSOLE
194+
// TEST[setup:range_index]
171195

172196
[[range-params]]
173197
==== Parameters for range fields

0 commit comments

Comments
 (0)