Milvex.ExprParams (milvex v0.10.2)

Copy Markdown

Converts Elixir values to Milvus TemplateValue protobuf structs for filter expression templating.

Filter templates allow parameterized filter expressions using {placeholder} syntax, where values are substituted at query time by Milvus. This improves performance by reducing expression parsing overhead, especially with large arrays or complex expressions.

Supported types

  • boolean -> bool_val
  • integer -> int64_val
  • float -> float_val
  • string -> string_val
  • [boolean] -> BoolArray
  • [integer] -> LongArray
  • [float] -> DoubleArray
  • [string] -> StringArray

Summary

Functions

Converts a map of parameter names to Elixir values into a map of TemplateValue protobuf structs.

Functions

to_proto(params)

@spec to_proto(map() | nil) :: %{
  required(String.t()) => Milvex.Milvus.Proto.Schema.TemplateValue.t()
}

Converts a map of parameter names to Elixir values into a map of TemplateValue protobuf structs.

Returns an empty map when given nil or an empty map.