title: Storing CIDR in IP type field in ElasticSearch
body: <p>Is it possible to store CIDR notations in the IP Address data type in elastic search? When I try to POST them into my index it fails. (singlerange property has ip type)</p>
  
  <pre><code>{
    "singlerange": "222.165.0.0/17",
    "name": "Single range"
  }
  </code></pre>
  
  <p>Result</p>
  
  <pre><code>{
    "error": {
      "root_cause": [
        {
          "type": "mapper_parsing_exception",
          "reason": "failed to parse [singlerange]"
        }
      ],
      "type": "mapper_parsing_exception",
      "reason": "failed to parse [singlerange]",
      "caused_by": {
        "type": "illegal_argument_exception",
        "reason": "'222.165.0.0/17' is not an IP string literal."
      }
    },
    "status": 400
  }
  </code></pre>
  
  <p>So, ES is telling me 'no' but before I gave up on ES as a tool for this I wanted to see if anyone had a workaround or alternative way of storing and querying ranges.</p>
  
  <p>I know the docs have the use case where you store IPs and query by ranges. Our use case is opposite, we want to store ranges and query the index for any range that contains a specific IP.</p>