Milvex.Collection.Dsl.Field (milvex v0.10.2)

Copy Markdown

Struct representing a field definition in the Milvex Collection DSL.

This struct is the target for all field entity definitions and contains all possible field configuration options. Not all options are valid for all field types - validation is handled by the verifiers.

Summary

Functions

Returns true if this field is an array field.

Returns true if this field is an array of structs field.

Returns true if this field is a primary key.

Returns true if this field is a scalar field.

Returns true if this field is a sparse vector field.

Returns true if this field is a vector field.

Types

t()

@type t() :: %Milvex.Collection.Dsl.Field{
  __spark_metadata__: term(),
  auto_id: boolean(),
  clustering_key: boolean(),
  default: term() | nil,
  description: String.t() | nil,
  dimension: pos_integer() | nil,
  dynamic: boolean(),
  element_type: atom() | nil,
  enable_analyzer: boolean(),
  is_primary_key: term(),
  max_capacity: pos_integer() | nil,
  max_length: pos_integer() | nil,
  name: atom(),
  nullable: boolean(),
  partition_key: boolean(),
  struct_schema: [Milvex.Schema.Field.t()] | nil,
  type: atom() | nil
}

Functions

array?(arg1)

@spec array?(t()) :: boolean()

Returns true if this field is an array field.

array_of_structs?(arg1)

@spec array_of_structs?(t()) :: boolean()

Returns true if this field is an array of structs field.

primary_key?(field)

@spec primary_key?(t()) :: boolean()

Returns true if this field is a primary key.

A field is considered a primary key if it has a non-nil type that is either :int64 or :varchar and no dimension (distinguishing from vectors). Primary keys are identified by the entity that created them.

scalar?(arg1)

@spec scalar?(t()) :: boolean()

Returns true if this field is a scalar field.

sparse_vector?(arg1)

@spec sparse_vector?(t()) :: boolean()

Returns true if this field is a sparse vector field.

vector?(arg1)

@spec vector?(t()) :: boolean()

Returns true if this field is a vector field.