Switch batch to use new js.SetIndex