I am trying to index word embedding vectors to Elasticsearch V8 ann dense_vector dot_product.
I can successfully index vec to cosine, so I converted it to unit vector with numpy for dot_product.
unit_vector = vec / np.linalg.norm(vec)
but I get an 400 error saying like this.
The [dot_product] similarity can only be used with unit-length vectors. Preview of invalid vector: [-0.0038341882, -0.1564709, 0.08771773, -0.14555556, -0.07952896, ...]
Am I missing something?