kmeans updates for new document vector api
merge conflict