Updated elastic to avoid recursion on indexing