Class IpFieldScript


public abstract class IpFieldScript extends AbstractFieldScript
Script producing IP addresses. Unlike the other AbstractFieldScripts which deal with their native java objects this converts its values to the same format that Lucene uses to store its fields, InetAddressPoint. There are a few compelling reasons to do this:
  • Inet4Addresses and Inet6Address are not comparable with one another. That is correct in some contexts, but not for our queries. Our queries must consider the IPv4 address equal to the address that it maps to in IPv6 rfc4291).
  • InetAddresses are not ordered, but we need to implement range queries with same same ordering as IpFieldMapper. That also uses InetAddressPoint so it saves us a lot of trouble to use the same representation.