Liking cljdoc? Tell your friends :D

milvus-clj.index

Milvus index creation and management.

Milvus requires explicit index creation on vector fields before search. Supports IVF_FLAT, HNSW, DISKANN, and other index types with configurable distance metrics.

Key difference from Chroma: Chroma auto-indexes. Milvus needs explicit index creation with type and metric selection.

Milvus index creation and management.

Milvus requires explicit index creation on vector fields before search.
Supports IVF_FLAT, HNSW, DISKANN, and other index types with
configurable distance metrics.

Key difference from Chroma: Chroma auto-indexes. Milvus needs explicit
index creation with type and metric selection.
raw docstring

->index-typeclj

(->index-type it)

Resolve keyword or IndexType to IndexType enum.

Resolve keyword or IndexType to IndexType enum.
sourceraw docstring

->metric-typeclj

(->metric-type mt)

Resolve keyword or MetricType to MetricType enum.

Resolve keyword or MetricType to MetricType enum.
sourceraw docstring

create-index-paramclj

(create-index-param {:keys [collection-name field-name index-type metric-type
                            index-name extra-params]})

Build a CreateIndexParam from a Clojure map.

Required keys: :collection-name - target collection :field-name - field to index (usually the vector field) :index-type - keyword from index-types (e.g. :hnsw, :ivf-flat) :metric-type - keyword from metric-types (e.g. :cosine, :l2, :ip)

Optional keys: :index-name - custom index name :extra-params - map of index-specific params IVF: {:nlist 1024} HNSW: {:M 16 :efConstruction 256}

Example: (create-index-param {:collection-name "memories" :field-name "embedding" :index-type :hnsw :metric-type :cosine :extra-params {:M 16 :efConstruction 256}})

Build a CreateIndexParam from a Clojure map.

Required keys:
  :collection-name - target collection
  :field-name      - field to index (usually the vector field)
  :index-type      - keyword from `index-types` (e.g. :hnsw, :ivf-flat)
  :metric-type     - keyword from `metric-types` (e.g. :cosine, :l2, :ip)

Optional keys:
  :index-name   - custom index name
  :extra-params - map of index-specific params
                  IVF:  {:nlist 1024}
                  HNSW: {:M 16 :efConstruction 256}

Example:
  (create-index-param
    {:collection-name "memories"
     :field-name      "embedding"
     :index-type      :hnsw
     :metric-type     :cosine
     :extra-params    {:M 16 :efConstruction 256}})
sourceraw docstring

default-memory-indexclj

Default index configuration for the memory embedding field. HNSW with cosine similarity — good balance of speed and recall.

HNSW params: M=16 — connections per node (higher = better recall, more memory) efConstruction=256 — build-time search width (higher = better recall, slower build)

Default index configuration for the memory embedding field.
HNSW with cosine similarity — good balance of speed and recall.

HNSW params:
  M=16             — connections per node (higher = better recall, more memory)
  efConstruction=256 — build-time search width (higher = better recall, slower build)
sourceraw docstring

describe-index-paramclj

(describe-index-param collection-name field-name)

Build a DescribeIndexParam for inspecting an existing index.

Build a DescribeIndexParam for inspecting an existing index.
sourceraw docstring

drop-index-paramclj

(drop-index-param collection-name field-name)

Build a DropIndexParam for removing an index.

Build a DropIndexParam for removing an index.
sourceraw docstring

index-typesclj

Mapping of keywords to Milvus IndexType enum values.

Common choices: :hnsw — Best recall, higher memory. Good for <10M vectors. :ivf-flat — Good balance. Works with partitions. :diskann — Disk-based. Best for >100M vectors. :autoindex — Let Milvus choose (cloud/managed).

Mapping of keywords to Milvus IndexType enum values.

Common choices:
  :hnsw     — Best recall, higher memory. Good for <10M vectors.
  :ivf-flat — Good balance. Works with partitions.
  :diskann  — Disk-based. Best for >100M vectors.
  :autoindex — Let Milvus choose (cloud/managed).
sourceraw docstring

metric-typesclj

Mapping of keywords to Milvus MetricType enum values.

:cosine — Cosine similarity (normalized). Default for embeddings. :l2 — Euclidean distance. Lower = more similar. :ip — Inner product. Higher = more similar.

Mapping of keywords to Milvus MetricType enum values.

:cosine — Cosine similarity (normalized). Default for embeddings.
:l2     — Euclidean distance. Lower = more similar.
:ip     — Inner product. Higher = more similar.
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