Add refresh index setting to -1 while indexing; optimizing afterwards

See #331.