title: Querying large collections in cosmos db
body: <p>We currently have a very large collection in our document DB.
  We want to be able to filter the collection based on some fields in the documents in the collection. </p>
  
  <p>When I perform this query via the portal it takes a really long time because there is so much data.
  When I perform this query via a function app, it cuts out after five minutes due to a time-out.</p>
  
  <p>What is the best way to perform this search?
  Is it possible to perform this search via Application Insights or some sort?
  I am aware that the query itself can take a long time but it shouldn't be blocking. Querying via the portal blocks all other actions.</p>
  
  <p>Thanks in advance.
  Regards</p>