doesnt this have a side effect since it changes the `DocumentStore`?