docs: def enable_refresh(index_name):
      '''
      Enable refresh and force merge. To be used after indexing.
  
      See: https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html#bulk
      '''  # noqa
      refresh_interval = current_app.config['ELASTICSEARCH_REFRESH_INTERVAL']
      es.indices.put_settings(index=index_name, body={
          'index': {'refresh_interval': refresh_interval}
      })
      es.indices.forcemerge(index=index_name, request_timeout=30)