Clarify that IP range data can be specified in CIDR notation. (#31374)

This commit is contained in:
Julie Tibshirani 2018-06-18 08:21:41 -07:00 committed by GitHub
parent 02a4ef38a7
commit 3f5ebb862d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 0 deletions

View File

@ -168,6 +168,30 @@ This query produces a similar result:
--------------------------------------------------
// TESTRESPONSE[s/"took": 13/"took" : $body.took/]
[[ip-range]]
==== IP Range
In addition to the range format above, IP ranges can be provided in
https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation[CIDR] notation:
[source,js]
--------------------------------------------------
PUT range_index/_mapping/_doc
{
"properties": {
"ip_whitelist": {
"type": "ip_range"
}
}
}
PUT range_index/_doc/2
{
"ip_whitelist" : "192.168.0.0/16"
}
--------------------------------------------------
// CONSOLE
// TEST[setup:range_index]
[[range-params]]
==== Parameters for range fields