title: Azure DocumentDB stored procedure returns nothing
body: <p>I'm new to Azure DocumentDB and encountering some unexpected behavior when executing a very basic stored procedure.  The stored procedure (shown below) is returning "no docs found", but the collection that the <code>SELECT</code> statement is querying from is populated with many documents.  Baffling me further is the fact that running the same <code>SELECT</code> statement in the Query Explorer results in a single document being returned as expected.  Am I missing something really fundamental here?</p>
  
  <pre><code>function simple() {
      var collection = getContext().getCollection();
  
      // Query documents and take 1st item.
      var isAccepted = collection.queryDocuments(
          collection.getSelfLink(),
          'SELECT TOP 1 * FROM MyCollection c',
          function (err, feed, options) {
              if (err) throw err;
  
              // Check the feed and if it's empty, set the body to 'no docs found',
              // Otherwise just take 1st element from the feed.
              if (!feed || !feed.length) getContext().getResponse().setBody("no docs found");
              else getContext().getResponse().setBody(JSON.stringify(feed[0]));
          });
  
      if (!isAccepted) throw new Error("The query wasn't accepted by the server. Try again/use continuation token between API and script.");
  }
  </code></pre>