diff --git a/internal/util/indexparamcheck/index_type.go b/internal/util/indexparamcheck/index_type.go index 3f0a5fa640..7ffd16052c 100644 --- a/internal/util/indexparamcheck/index_type.go +++ b/internal/util/indexparamcheck/index_type.go @@ -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 { diff --git a/internal/util/indexparamcheck/index_type_test.go b/internal/util/indexparamcheck/index_type_test.go index 5b744ed6b8..05a03aaf9e 100644 --- a/internal/util/indexparamcheck/index_type_test.go +++ b/internal/util/indexparamcheck/index_type_test.go @@ -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) + }) }