I've tried defining a passage_embedding using both:
"passage_embedding": {
"type": "dense_vector",
"dims": 768,
"similarity": "cosine",
"index": "true"
},
and as follows:
"passage_embedding.predicted_value": {
"type": "dense_vector",
"dims": 768,
"similarity": "cosine",
"index": "true"
},
and I've also tried using a pipeline processor as:
{
"inference": {
"model_id": "intfloat__multilingual-e5-base",
"target_field": "passage_embedding",
"field_map": {
"passage": "text_field"
}
}
},
as well as with an inference_config:
{
"inference": {
"model_id": "intfloat__multilingual-e5-base",
"target_field": "passage_embedding",
"field_map": {
"passage": "text_field"
},
"inference_config": {
"text_embedding": {
"results_field": "predicted_value"
}
}
}
},
however, while I do receive an array of floats under the passage_embedding.predicted_values field the definition does not show as dense_vector so attempting knn queries fails. What I get is:
"passage_embedding": {
"properties": {
"dims": {
"type": "long"
},
"index": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"similarity": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
Note, the size isn't getting set to 512 either.