mirror of
https://github.com/milvus-io/milvus.git
synced 2026-07-21 02:05:41 +00: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:
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user