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:
Spade A 2025-09-03 14:35:53 +08:00 committed by GitHub
parent e3ecacca9e
commit 1b583e4b54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View File

@ -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 {

View File

@ -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)
})
}