Removed reference to snapshotDb.name and made query support optional
Added index parameter to queryNeedsPollMode