fix: Skip building text index for newly added columns (#45316)

issue: #45315

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
This commit is contained in:
cai.zhang 2025-11-06 19:47:35 +08:00 committed by GitHub
parent 2dd2c96eb1
commit b8f9384a85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -446,12 +446,12 @@ func (st *statsTask) createTextIndex(ctx context.Context,
return binlog.GetFieldID()
})
getInsertFiles := func(fieldID int64) ([]string, error) {
getInsertFiles := func(fieldID int64, enableNull bool) ([]string, error) {
if st.req.GetStorageVersion() == storage.StorageV2 {
return []string{}, nil
}
binlogs, ok := fieldBinlogs[fieldID]
if !ok {
if !ok && !enableNull {
return nil, fmt.Errorf("field binlog not found for field %d", fieldID)
}
result := make([]string, 0, len(binlogs))
@ -476,7 +476,7 @@ func (st *statsTask) createTextIndex(ctx context.Context,
}
log.Info("field enable match, ready to create text index", zap.Int64("field id", field.GetFieldID()))
// create text index and upload the text index files.
files, err := getInsertFiles(field.GetFieldID())
files, err := getInsertFiles(field.GetFieldID(), field.GetNullable())
if err != nil {
return err
}