Skip to content

Commit

Permalink
Support SCANN index type
Browse files Browse the repository at this point in the history
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
  • Loading branch information
congqixia committed Aug 11, 2023
1 parent 30d93d9 commit a1dbddf
Showing 6 changed files with 223 additions and 0 deletions.
35 changes: 35 additions & 0 deletions entity/genidx/genidx.go
Original file line number Diff line number Diff line change
@@ -708,6 +708,41 @@ func main() {
"nprobe = 65537",
},
},
{
IdxName: "SCANN",
IdxType: entity.IvfFlat,
ConstructParams: []idxParam{
{
Name: "nlist",
ValidationRule: "[1, 65536]",
},
},
SearchParams: []idxParam{
{
Name: "nprobe",
ValidationRule: "[1, 65536]", // [1, nlist], refer to index construct param, not supported yet
},
{
Name: "reorder_k",
ValidationRule: "[1, 9223372036854775807]", // [topk, MAX_INT], refer to index construct param, not supported yet
},
},
ValidExamples: []string{
"nlist = 100",
},
InvalidExamples: []string{
"nlist = 0",
"nlist = 65537",
},
ValidSearchParams: []string{
"nprobe, reorder_k = 10, 200",
},
InvalidSearchParams: []string{
"nprobe, reorder_k = 0, 200",
"nprobe, reorder_k = 65537, 200",
"nprobe, reorder_k = 10, -1",
},
},
},
}

1 change: 1 addition & 0 deletions entity/index.go
Original file line number Diff line number Diff line change
@@ -36,6 +36,7 @@ const (
IvfHNSW IndexType = "IVF_HNSW"
AUTOINDEX IndexType = "AUTOINDEX"
DISKANN IndexType = "DISKANN"
SCANN IndexType = "SCANN"

GPUIvfFlat IndexType = "GPU_IVF_FLAT"
GPUIvfPQ IndexType = "GPU_IVF_PQ"
56 changes: 56 additions & 0 deletions entity/indexes_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions entity/indexes_gen_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions entity/indexes_search_param_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions entity/indexes_search_param_gen_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a1dbddf

Please sign in to comment.