mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix: fixing ngram index rejecting mmap (#44175)
issue: https://github.com/milvus-io/milvus/issues/44164 Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
This commit is contained in:
parent
e3ecacca9e
commit
1b583e4b54
@ -64,7 +64,8 @@ func IsScalarMmapIndex(indexType IndexType) bool {
|
||||
return indexType == IndexINVERTED ||
|
||||
indexType == IndexBitmap ||
|
||||
indexType == IndexHybrid ||
|
||||
indexType == IndexTrie
|
||||
indexType == IndexTrie ||
|
||||
indexType == IndexNGRAM
|
||||
}
|
||||
|
||||
func ValidateMmapIndexParams(indexType IndexType, indexParams map[string]string) error {
|
||||
|
||||
@ -65,4 +65,11 @@ func TestValidateMmapTypeParams(t *testing.T) {
|
||||
})
|
||||
assert.Error(t, err)
|
||||
})
|
||||
|
||||
t.Run("stl_mmap mmap enable", func(t *testing.T) {
|
||||
err := ValidateMmapIndexParams(IndexNGRAM, map[string]string{
|
||||
common.MmapEnabledKey: "true",
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user