title: Elasticsearch throws error about malformed wildcard query even though query follows documentation
body: <p>I'm writing a simple elasticsearch query but cannot get the elasticsearch to accept a simple query like this (copied from my node console running typescript):</p>
  
  <pre><code>{
    query: {
      wildcard: {
        name: {
          value: 'begin*'
        }
      },
      bool: {
        must: [
          {
            term: {
              'companyId.keyword': 'KEYWORD'
             }
           }
         ]
       }
     } 
  }
  </code></pre>
  
  <p>2 things to note:</p>
  
  <p>1.) the bool section of the query will work and get results on its own
  2.) I followed the documentation of wildcards here: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.x/query-dsl-wildcard-query.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/elasticsearch/reference/7.x/query-dsl-wildcard-query.html</a></p>
  
  <p>However, when I make the query, I get this response:</p>
  
  <p><code>[wildcard] malformed query, expected [END_OBJECT] but found [FIELD_NAME]</code></p>
  
  <p>What am I doing incorrectly?</p>