Update indexer.js

Pass batch as object instead of string.