support optimization of indices
document optimize/1 and optimize/2