Skip to content

Commit 5f6fcdf

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

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
@@ -113,6 +113,30 @@ The result produced by the above query.
113113
--------------------------------------------------
114114
// TESTRESPONSE[s/"took": 13/"took" : $body.took/]
115115

116+
[[ip-range]]
117+
==== IP Range
118+
119+
In addition to the range format above, IP ranges can be provided in
120+
https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation[CIDR] notation:
121+
122+
[source,js]
123+
--------------------------------------------------
124+
PUT range_index/_mapping/_doc
125+
{
126+
"properties": {
127+
"ip_whitelist": {
128+
"type": "ip_range"
129+
}
130+
}
131+
}
132+
133+
PUT range_index/_doc/2
134+
{
135+
"ip_whitelist" : "192.168.0.0/16"
136+
}
137+
--------------------------------------------------
138+
// CONSOLE
139+
116140
[[range-params]]
117141
==== Parameters for range fields
118142

0 commit comments

Comments
 (0)