title: Script on child type no longer working since upgrading ElasticSearch from 1.3x to 2.3x
body: <p>The query below works on my ES 1.3.4 index, but doesn't on my ES 2.3.0 index, any idea why this has stopped working or how I can fix it?  My index has a parent child relationship between product and product_region.</p>
  
  <p>The error it gives is: </p>
  
  <pre><code>No field found for [product_region.mask] in mapping with types [product]
  </code></pre>
  
  <p>Relevant part of the query is:</p>
  
  <pre><code>"query": {
      "filtered": {
        "query": {
          "bool": {
            "must": [
              {
                "bool": {
                  "should": [
                    {
                      "wildcard": {
                        "product_number": {
                          "value": "*999*"
                        }
                      }
                    },
                    {
                      "wildcard": {
                        "product_code": {
                          "value": "*999*"
                        }
                      }
                    }
                  ]
                }
              }
            ]
          }
        },
        "filter": {
          "or": [
            {
              "has_child": {
                "type": "product_region",
                "query": {
                  "constant_score": {
                    "filter": {
                      "and": [
                        {
                          "missing": {
                            "field": "ref_val1"
                          }
                        },
                        {
                          "script": {
                            "script": "(doc['product_region.mask'].value &amp; 65535) &gt; 0"
                          }
                        },
                        {
                          "or": [
                            {
  </code></pre>