       else
         db = snapshotDb
 
-      db.query this, cName, query, (err, results) =>
+      db.query this, cName, query, (err, resultset) =>
         if err
           callback err
-        else if Array.isArray results
-          callback null, results
+        else if Array.isArray resultset
+          callback null, resultset
         else
-          callback null, results.results, results.extra
+          callback null, resultset.results, resultset.extra
 
     # For mongo, the index is just the collection itself. For something like
     # SOLR, the index refers to the core we're actually querying.

{Readable} = require 'stream'
{EventEmitter} = require 'events'
assert = require 'assert'
redisLib = require 'redis'
arraydiff = require 'arraydiff'
ot = require './ot'

          emitter.destroy = ->
            stream.destroy()

          if !Array.isArray resultset
            # Resultset is an object. It should look like {results:[..], data:....}
            emitter.extra = extra = resultset.extra
            results = resultset.results
          else
            results = resultset

          emitter.data = results

