title: Mongosastic query to query on indexed data and filter by date
body: <p>I have Paper indexed in my elastic index and need to perform a multi match query on it. Query is to be done on an array of names and also an array of ids. My query fetches the result but only on one of the criteria.</p>
  
  <pre><code>Paperupload.esSearch({ 
      from:from,
      size:size,
              query:{
                  bool:{
                      "must": {
                          "bool" : { "must": [{terms : {"topics.topic_name": topi}}] } 
                      },
                      "must": {
                          "bool" : { "must": [{terms : {"userId._id": followersDetail}}] }
                      },
                      "must_not": {
                          "bool" : { "should": [{terms : {"_id": userPapersId}}] }
                      } 
                  }
              },
              sort:{
                  "createdAt":{
                      "order" : "desc"
                  }
              }   
  },
  function(err, results) {
  }
  </code></pre>
  
  <p>Paperupload is my indexed elastic index. I am performing search on 3 fields and sorting them by the <code>createdAt</code> date. my result set is only consist of result based on first condition. I have used NPM mongosastic.</p>
  
  <p>Result should be mixture of all 3 criteria but sorted by <code>createdAt</code> date.</p>