I'm attempting to build an index using the DiskANN type, but I'm encountering an error stating that the index type is not supported. Here is my schema. I'm confused because it’s based on a float vector with the inner product (IP) metric, and according to the Milvus documentation https://milvus.io/docs/disk_index.md, this should be supported. Could someone explain why this might be happening?
fields = [
FieldSchema(
name="id",
dtype=DataType.INT64,
is_primary=True,
auto_id=False,
max_length=100,
),
FieldSchema(name="priority", dtype=DataType.FLOAT),
FieldSchema(name="embeddings", dtype=DataType.FLOAT_VECTOR, dim=dim), ## dim = 100
]
schema = CollectionSchema(fields, "points with id and priority")
points = Collection("points", schema, consistency_level="Strong")
points.insert(entities)
points.flush()
index_params: {
"index_type": "DISKANN",
"metric_type": "IP",
"params": {},
}
points.create_index("embeddings", index_params)
The default value for indexNode.enableDisk
is true. This configuration determines whether disk indexing is supported. If set to true, disk indexing is enabled; if set to false, disk indexing is not supported. Disk indexing requires a hard disk. Sometimes, Milvus is deployed on hosts without a hard disk, which is why this configuration option is provided.
The type of index created depends on the index_params
you specify when calling create_index()
:
FLAT
/IVF_FLAT
/HNSW
/IVF_SQ8
/IVF_PQ
— fully in memoryDISKINDEX
— partly in memory, partly on disk
It is not possible to store a DISKINDEX
entirely in memory.