documents weighted sum