Skip to content

Commit

Permalink
Add DiskANN index type
Browse files Browse the repository at this point in the history
Closes #56
  • Loading branch information
roji committed Feb 29, 2024
1 parent c2f10ec commit 0134ff0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions Milvus.Client.Tests/IndexTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public async Task Create_scalar_index()
[InlineData(IndexType.IvfSq8, """{ "nlist": "8" }""")]
[InlineData(IndexType.IvfPq, """{ "nlist": "8", "m": "4" }""")]
[InlineData(IndexType.Hnsw, """{ "efConstruction": "8", "M": "4" }""")]
[InlineData(IndexType.DiskANN, """{ "nlist": "8" }""")]
[InlineData(IndexType.AutoIndex, """{ }""")]
public async Task Index_types_float(IndexType indexType, string extraParamsString)
{
Expand Down
7 changes: 7 additions & 0 deletions Milvus.Client/IndexType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ public enum IndexType
/// </remarks>
Hnsw,

/// <summary>
/// SCANN (Score-aware quantization loss) is similar to <see cref="IvfPq" /> in terms of vector clustering and
/// product quantization. What makes them different lies in the implementation details of product quantization and
/// the use of SIMD (Single-Instruction / Multi-data) for efficient calculation.
/// </summary>
DiskANN,

/// <summary>
/// ANNOY (Approximate Nearest Neighbors Oh Yeah) is an index that uses a hyperplane to divide a high-dimensional
/// space into multiple subspaces, and then stores them in a tree structure.
Expand Down
1 change: 1 addition & 0 deletions Milvus.Client/MilvusCollection.Index.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ static string GetGrpcIndexType(IndexType indexType)
IndexType.IvfPq => "IVF_PQ",
IndexType.IvfSq8 => "IVF_SQ8",
IndexType.Hnsw => "HNSW",
IndexType.DiskANN => "DISKANN",
IndexType.RhnswFlat => "RHNSW_FLAT",
IndexType.RhnswPq => "RHNSW_PQ",
IndexType.RhnswSq => "RHNSW_SQ",
Expand Down

0 comments on commit 0134ff0

Please sign in to comment.