title: Elasticsearch: Filter based on a property that is only defined on one of two mappings
body: <p>I have two indexes, <code>pages</code> and <code>events</code> that are both being searched using a simple search query:</p>
  
  <h3>Example Query:</h3>
  
  <pre class="lang-json prettyprint-override"><code>{
    "query": {
      "bool": {
        "must": [
          {
            "match": {
              "siteHandle": "testing"
            }
          },
          {
            "simple_query_string": {
              "query": "Test New Event",
              "fields": [
                "Name^3",
                "evName^3",
                "Description^2",
                "evDescription^2",
                "_all"
              ]
            }
          }
        ]
      }
    }
  }
  </code></pre>
  
  <p>The mappings look something like this:</p>
  
  <h3><code>events</code>:</h3>
  
  <pre class="lang-json prettyprint-override"><code>{
    "events": {
      "properties": {
        "evDescription": {
          "type": "text"
        },
        "evName": {
          "type": "text"
        },
        "siteHandle": {
          "type": "keyword"
        },
        "startTime": {
          "type": "integer"
        }
      }
    }
  }
  </code></pre>
  
  <h3><code>pages</code>:</h3>
  
  <pre class="lang-json prettyprint-override"><code>{
    "pages": {
      "properties": {
        "cName": {
          "type": "text"
        },
        "cPath": {
          "type": "keyword"
        },
        "content": {
          "type": "text"
        },
        "siteHandle": {
          "type": "keyword"
        }
      }
    }
  }
  </code></pre>
  
  <hr>
  
  <p>I need to filter out events that have <code>startTime</code> less than now, but I'm not sure how to do it without filtering out all <code>pages</code>.</p>
  
  <p><strong>Q: How can I search both <code>events</code> and <code>pages</code> with this query while filtering out ONLY <code>events</code> that have a <code>startTime</code> less than now?</strong></p>