Query a field that can be host or IP

We have a field that can have either a host name (e.g. elastic.co) or an IP. We would like to run queries as a regular text field or using CIDR notation. What is the best solution for this? Should we create a multi-field with text and ip and determine which to use in each case? Is there a better solution for indexing this type of field?

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