Sorting an `ip_range` field based on the first IP in the network address

Is this possible to do using Painless? I've been trying to figure out a way and haven't succeeded yet.

E.g. given 3 records where the ip_range field is 192.168.100.0/24, 192.168.0.0/16, 192.168.98.0/23, I'd like to sort and get back:

192.168.0.0/16
192.168.98.0/23
192.168.100.0/24

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.