mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
Return appropriate error on null dims update instead of npe (#125716)
Calling `Object::toString` was trying to call `null.toString()`, really it should have been `Objects::toString`, which accepts `null`. closes: https://github.com/elastic/elasticsearch/issues/125713
This commit is contained in:
parent
83c0ca14f7
commit
dd58b0b6fa
6 changed files with 59 additions and 2 deletions
|
@ -605,3 +605,28 @@ setup:
|
|||
- match: { hits.hits.0._score: $knn_score0 }
|
||||
- match: { hits.hits.1._score: $knn_score1 }
|
||||
- match: { hits.hits.2._score: $knn_score2 }
|
||||
---
|
||||
"Updating dim to null is not allowed":
|
||||
- requires:
|
||||
cluster_features: "mapper.npe_on_dims_update_fix"
|
||||
reason: "dims update fix"
|
||||
- do:
|
||||
indices.create:
|
||||
index: test_index
|
||||
|
||||
- do:
|
||||
indices.put_mapping:
|
||||
index: test_index
|
||||
body:
|
||||
properties:
|
||||
embedding:
|
||||
type: dense_vector
|
||||
dims: 4
|
||||
- do:
|
||||
catch: bad_request
|
||||
indices.put_mapping:
|
||||
index: test_index
|
||||
body:
|
||||
properties:
|
||||
embedding:
|
||||
type: dense_vector
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue