Liking cljdoc? Tell your friends :D

milvus-clj.schema

Milvus schema building: FieldType and CollectionSchema construction.

Converts idiomatic Clojure maps to Milvus Java SDK builder objects. Unlike Chroma (schemaless), Milvus requires explicit field definitions with types, dimensions, and constraints before data can be inserted.

Usage: (collection-schema [{:name "id" :type :varchar :primary? true :max-length 256} {:name "embedding" :type :float-vector :dimension 1536} {:name "content" :type :varchar :max-length 65535}] :description "Memory collection")

Milvus schema building: FieldType and CollectionSchema construction.

Converts idiomatic Clojure maps to Milvus Java SDK builder objects.
Unlike Chroma (schemaless), Milvus requires explicit field definitions
with types, dimensions, and constraints before data can be inserted.

Usage:
  (collection-schema
    [{:name "id" :type :varchar :primary? true :max-length 256}
     {:name "embedding" :type :float-vector :dimension 1536}
     {:name "content" :type :varchar :max-length 65535}]
    :description "Memory collection")
raw docstring

->data-typeclj

(->data-type dt)

Resolve a keyword or DataType instance to a DataType enum value. Throws ex-info with valid keys on unknown type.

Resolve a keyword or DataType instance to a DataType enum value.
Throws ex-info with valid keys on unknown type.
sourceraw docstring

collection-schemaclj

(collection-schema fields)

Build a CollectionSchemaParam from a sequence of field definition maps.

Each field map is passed to field-type. Note: description is set on CreateCollectionParam, not on the schema.

Example: (collection-schema [{:name "id" :type :varchar :primary? true :max-length 256} {:name "embedding" :type :float-vector :dimension 1536} {:name "content" :type :varchar :max-length 65535}])

Build a CollectionSchemaParam from a sequence of field definition maps.

Each field map is passed to `field-type`.
Note: description is set on CreateCollectionParam, not on the schema.

Example:
  (collection-schema
    [{:name "id"        :type :varchar      :primary? true :max-length 256}
     {:name "embedding" :type :float-vector :dimension 1536}
     {:name "content"   :type :varchar      :max-length 65535}])
sourceraw docstring

data-typesclj

Mapping of keywords to Milvus DataType enum values.

Mapping of keywords to Milvus DataType enum values.
sourceraw docstring

field-typeclj

(field-type {:keys [name type primary? auto-id? max-length dimension
                    description]
             :or {primary? false auto-id? false}})

Build a Milvus FieldType from a Clojure map.

Required keys: :name - field name (string or keyword) :type - data type keyword (see data-types)

Optional keys: :primary? - is this the primary key? (default false) :auto-id? - auto-generate IDs? (default false) :max-length - max length for VarChar fields :dimension - vector dimension for FloatVector/BinaryVector :description - field description string

Example: (field-type {:name "embedding" :type :float-vector :dimension 1536})

Build a Milvus FieldType from a Clojure map.

Required keys:
  :name       - field name (string or keyword)
  :type       - data type keyword (see `data-types`)

Optional keys:
  :primary?    - is this the primary key? (default false)
  :auto-id?    - auto-generate IDs? (default false)
  :max-length  - max length for VarChar fields
  :dimension   - vector dimension for FloatVector/BinaryVector
  :description - field description string

Example:
  (field-type {:name "embedding" :type :float-vector :dimension 1536})
sourceraw docstring

memory-schema-fieldsclj

Default schema fields for hive-mcp memory collections. Mirrors the metadata stored in Chroma, translated to Milvus field types.

Use with collection-schema: (collection-schema memory-schema-fields)

Default schema fields for hive-mcp memory collections.
Mirrors the metadata stored in Chroma, translated to Milvus field types.

Use with `collection-schema`:
  (collection-schema memory-schema-fields)
sourceraw docstring

with-dimensionclj

(with-dimension dim)

Return memory-schema-fields with the embedding dimension adjusted.

Example: (collection-schema (with-dimension 768))

Return memory-schema-fields with the embedding dimension adjusted.

Example:
  (collection-schema (with-dimension 768))
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close