Add refresh setting

See #331.

* close index, then update, reopen, refresh and optimize
* increase ES bulk size used by indexing