You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the bug?
It is not possible to train a model from a field that is not a top level field in the opensearch field mappings.
How can one reproduce the bug?
If I have a knn vector field located at the path vector.faiss.hnsw.inner_ef100_m16_flat that uses the following mappings
{"error":{"root_cause":[{"type":"action_request_validation_exception","reason":"Validation Failed: 1: Field \"vector.faiss.hnsw.inner_ef100_m16_flat\" does not exist.;"}],"type":"action_request_validation_exception","reason":"Validation Failed: 1: Field \"vector.faiss.hnsw.inner_ef100_m16_flat\" does not exist.;"},"status":400}
Even though I have confirmed that the field exists and that it has the correct data.
If I change the name of the field to top_vector and put it at the top of the mappings like this, and add the same data as before to the new field, THEN I can train a model.
...
"mappings": {
...
"properties": {
...
"top_vector": {
"type": "knn_vector"
... all the same settings as above..
}
...
which makes the assumption that the field must be in the top of the properties hierarchy in the mappings, which is no documented in any documentation as far as I can tell, and even if it was, it seems like a weird limitation to not allow the vector field to be anywhere in the document.
The text was updated successfully, but these errors were encountered:
What is the bug?
It is not possible to train a model from a field that is not a top level field in the opensearch field mappings.
How can one reproduce the bug?
If I have a knn vector field located at the path vector.faiss.hnsw.inner_ef100_m16_flat that uses the following mappings
When I try to train a model from that field using the method described in https://opensearch.org/docs/latest/search-plugins/knn/api#usage-5
I get this error message
{"error":{"root_cause":[{"type":"action_request_validation_exception","reason":"Validation Failed: 1: Field \"vector.faiss.hnsw.inner_ef100_m16_flat\" does not exist.;"}],"type":"action_request_validation_exception","reason":"Validation Failed: 1: Field \"vector.faiss.hnsw.inner_ef100_m16_flat\" does not exist.;"},"status":400}
Even though I have confirmed that the field exists and that it has the correct data.
If I change the name of the field to top_vector and put it at the top of the mappings like this, and add the same data as before to the new field, THEN I can train a model.
I believe the error is in
k-NN/src/main/java/org/opensearch/knn/index/IndexUtil.java
Line 103 in 4d6cc16
The text was updated successfully, but these errors were encountered: