diff --git a/internal/datacoord/task_index.go b/internal/datacoord/task_index.go index b4fbe36b51..d082d88eac 100644 --- a/internal/datacoord/task_index.go +++ b/internal/datacoord/task_index.go @@ -211,7 +211,7 @@ func (it *indexBuildTask) PreCheck(ctx context.Context, dependency *taskSchedule optionalFields := make([]*indexpb.OptionalFieldInfo, 0) partitionKeyIsolation := false isVectorTypeSupported := typeutil.IsDenseFloatVectorType(field.DataType) || typeutil.IsBinaryVectorType(field.DataType) - if Params.CommonCfg.EnableMaterializedView.GetAsBool() && isOptionalScalarFieldSupported(indexType) && isVectorTypeSupported { + if Params.CommonCfg.EnableMaterializedView.GetAsBool() && isVectorTypeSupported && isMvSupported(indexType) { if collectionInfo == nil { log.Ctx(ctx).Warn("get collection failed", zap.Int64("collID", segIndex.CollectionID), zap.Error(err)) it.SetState(indexpb.JobState_JobStateInit, err.Error()) diff --git a/internal/datacoord/util.go b/internal/datacoord/util.go index dae4901ec5..19b4fa2f68 100644 --- a/internal/datacoord/util.go +++ b/internal/datacoord/util.go @@ -207,7 +207,7 @@ func isNoTrainIndex(indexType string) bool { return vecindexmgr.GetVecIndexMgrInstance().IsNoTrainIndex(indexType) } -func isOptionalScalarFieldSupported(indexType string) bool { +func isMvSupported(indexType string) bool { return vecindexmgr.GetVecIndexMgrInstance().IsMvSupported(indexType) } diff --git a/internal/util/vecindexmgr/vector_index_mgr.go b/internal/util/vecindexmgr/vector_index_mgr.go index 83444c1a57..8b3a766955 100644 --- a/internal/util/vecindexmgr/vector_index_mgr.go +++ b/internal/util/vecindexmgr/vector_index_mgr.go @@ -87,7 +87,6 @@ type vecIndexMgrImpl struct { func (mgr *vecIndexMgrImpl) GetFeature(indexType IndexType) (uint64, bool) { feature, ok := mgr.features[indexType] if !ok { - log.Error("can not find index " + indexType + " in the index feature map") return 0, false } return feature, true