Migrate DenseVectorProperty.similarity from String to DenseVectorSimilarity enum

Proprietary

In Elasticsearch 9, DenseVectorProperty.similarity() returns DenseVectorSimilarity enum instead of String, and the builder method similarity(String) now accepts the enum type. This recipe handles both builder calls and getter calls.

io.moderne.elastic.elastic9.MigrateDenseVectorSimilarity
mod run . --recipe=io.moderne.elastic.elastic9.MigrateDenseVectorSimilarity

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.