ash_postgres/lib/functions/vector_cosine_distance.ex

10 lines
270 B
Elixir
Raw Permalink Normal View History

defmodule AshPostgres.Functions.VectorCosineDistance do
@moduledoc """
Maps to the vector cosine distance operator. Requires `vector` extension to be installed.
"""
use Ash.Query.Function, name: :vector_cosine_distance
def args, do: [[:vector, :vector]]
end