title: How to use the QueryResult in Bluemix to get the BasicDocumentRevision
body: <pre><code>public List&lt;Task&gt; allTasks() {
      int nDocs = this.mDatastore.getDocumentCount();
      List&lt;BasicDocumentRevision&gt; all = this.mDatastore.getAllDocuments(0, nDocs, true);
      List&lt;Task&gt; tasks = new ArrayList&lt;Task&gt;();
  
      // Filter all documents down to those of type Task.
      IndexManager im = new IndexManager(mDatastore);
      List&lt;Object&gt; indexFields = new ArrayList&lt;Object&gt;();
      indexFields.add("city");
      indexFields.add("price");
      indexFields.add("Area");
      indexFields.add("Information");
      indexFields.add("imagename");
  
  // Create the index
      im.ensureIndexed(indexFields);
      Map&lt;String, Object&gt; query = new HashMap&lt;String, Object&gt;();
      query.put("desc", "RESIDENTIAL PROPERTY");
      QueryResult result = im.find(query);
  
  
      for(BasicDocumentRevision rev :all) {
          Task t = Task.fromRevision(rev);
          if (t != null) {
  
              tasks.add(t);
  
          }
      }
  
      return tasks;
  </code></pre>
  
  <p>How do you use queryresult to get it stored in a task class object? I want my query to only be listed in listview. I am working on Bluemix, which uses Cloudant syn.</p>