mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
Added ESQL function to get the prefix of an IP. It works now with both IPv4 and IPv6. For users planning to use it with mixed IPs, we may need to add a function like "is_ipv4()" first. **About the skipped test:** There's currently a "bug" in the evaluators//functions that return null. Evaluators can't handle them. We'll work on support for that in another PR. It affects other functions, like `substring()`. In this function, however, it only affects in "wrong" cases (Like an invalid prefix), so it has no impact. Fixes https://github.com/elastic/elasticsearch/issues/99064
15 lines
427 B
Text
Generated
15 lines
427 B
Text
Generated
// This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
|
|
|
|
[discrete]
|
|
[[esql-ip_prefix]]
|
|
=== `IP_PREFIX`
|
|
|
|
*Syntax*
|
|
|
|
[.text-center]
|
|
image::esql/functions/signature/ip_prefix.svg[Embedded,opts=inline]
|
|
|
|
include::../parameters/ip_prefix.asciidoc[]
|
|
include::../description/ip_prefix.asciidoc[]
|
|
include::../types/ip_prefix.asciidoc[]
|
|
include::../examples/ip_prefix.asciidoc[]
|