ElastciSearchでThe vector functions of the form function(query, doc[‘field’]) are deprecated

投稿者:

このようなエラー

#! The vector functions of the form function(query, doc['field']) are deprecated, and the form function(query, 'field') should be used instead. For example, cosineSimilarity(query, doc['field']) is replaced by cosineSimilarity(query, 'field').

ドキュメントのサンプルでコサイン類似度検索していたら出た

https://www.elastic.co/jp/blog/text-similarity-search-with-vectors-in-elasticsearch

今までcosineSimilarity(query, doc[“field”])のように指定できたけど今後はcosineSimilarity(query, “field”)でおkって話

Elastic Stack実践ガイド[Elasticsearch/Kibana編] impress top gearシリーズ