I am having problems updating a document with an array of dense vectors. According to the documentation (and empirically by my code in other areas) , In Elasticsearch, there is no dedicated array data type. Any field can contain zero or more values by default, however, all values in the array must be of the same data type.
mapping:
"test_vector": {
"type": "dense_vector",
"dims": 3
}
update in python, this fails:
my_vector1 = [0.5, 0.2, 0.1]
my_vector2 = [0.1, 0.4, 0.8]
test_vector=[] # list
test_vector.append(my_vector1)
test_vector.append(my_vector2)
doc = {
"test_vector":test_vector
}
ret_val = elastic_client.update(index=index, id=_id,body={"doc":doc})
'Failed to parse object: expecting token of type [VALUE_NUMBER] but found [START_ARRAY]'