documentstore init changes

To be able to use another documentstore.