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 e7b211f commit 5f6fcdf
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 @@ -113,6 +113,30 @@ The result produced by the above query.
--------------------------------------------------
// 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

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

Expand Down

0 comments on commit 5f6fcdf

Please sign in to comment.