title: Elasticsearch KNN search with keyword terms
body: <p>I am currently trying to build a search where the knn search will be used within the set of results from a terms query. Below is my test query, but I run into an error &quot;malformed query, expected [END_OBJECT] but found [FEILD_NAME]&quot;</p>
  <pre><code>GET my-index2/_search
  {
    &quot;query&quot;:{
      &quot;bool&quot;:{
        &quot;should&quot;:[
          {&quot;terms&quot;:{&quot;t&quot;:[&quot;hello&quot;]}}
          ]
      },
      &quot;knn&quot;: {
        &quot;my_vector2&quot;: {
          &quot;vector&quot;: [2, 3, 5, 6],
          &quot;k&quot;: 2
        }
      }
    },
    &quot;_source&quot;:[&quot;t&quot;]
  }
  </code></pre>
  <p>Is there anyway to accomplish this?</p>