# `Milvex.Collection.Dsl.Field`

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.

# `t`

```elixir
@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
}
```

# `array?`

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

Returns true if this field is an array field.

# `array_of_structs?`

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

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

# `primary_key?`

```elixir
@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?`

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

Returns true if this field is a scalar field.

# `sparse_vector?`

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

Returns true if this field is a sparse vector field.

# `vector?`

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

Returns true if this field is a vector field.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
