dbscan and document distance