Skip to content

Commit

Permalink
Clarify that IP range data can be specified in CIDR notation. (#31374)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3f5ebb8)
  • Loading branch information
jtibshirani committed Jun 22, 2018
1 parent bbdeb65 commit 8d4908b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/reference/mapping/types/range.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8d4908b

Please sign in to comment.