title: How to add where clause in elasticsearch
body: <p>I am very new to elasticsearch. I have an elastic search query which returns all users present in database based on keyword but here I need to get only the users whose active status is true but now I am getting all list of users.</p>
  
  <p>I have built a search query like </p>
  
  <pre><code>    {
          "from" : 0,
          "size" : 30,
          "query" : {
              "query_string" : {
                  "query" : "*jhon*",
                  "default_field" : "_all"
              }
          },
          "sort" : [ 
              {
                  "id" : {
                      "order" : "desc"
                  }
              }
          ]
      }
  </code></pre>
  
  <p>I am using a query like <code>*jhon*</code>, but I need to get result like users with name <code>jhon</code> and his active status should be true, so  I have tried <code>*"+jhon+"\*"#activated~true"</code> but I am not getting the desired result.
  I don't know what I am doing wrong.</p>