diff --git a/common/persistence/pinot/pinot_visibility_store.go b/common/persistence/pinot/pinot_visibility_store.go index e15e3b5f3b5..6d6a082eb82 100644 --- a/common/persistence/pinot/pinot_visibility_store.go +++ b/common/persistence/pinot/pinot_visibility_store.go @@ -62,6 +62,9 @@ const ( IsDeleted = "IsDeleted" // used for Pinot deletion/rolling upsert only, not visible to user EventTimeMs = "EventTimeMs" // used for Pinot deletion/rolling upsert only, not visible to user Memo = "Memo" + WfIDTextSearch = "WorkflowIDTextSearch" // used for text search which can improve the partial match performance on WorkflowID/RunID/WorkflowType text search columns + WfTypeTextSearch = "WorkflowTypeTextSearch" // used for text search which can improve the partial match performance on WorkflowID/RunID/WorkflowType text search columns + RunIDTextSearch = "RunIDTextSearch" // used for text search which can improve the partial match performance on WorkflowID/RunID/WorkflowType text search columns // used to be micro second oneMicroSecondInNano = int64(time.Microsecond / time.Nanosecond) @@ -615,7 +618,10 @@ func createVisibilityMessage( m[UpdateTime] = updateTimeUnixMilli m[ShardID] = shardID m[IsDeleted] = isDeleted - m[EventTimeMs] = updateTimeUnixMilli // same as update time when record is upserted, could not use updateTime directly since this will be modified by Pinot + m[EventTimeMs] = updateTimeUnixMilli // same as update time when record is upserted, could not use updateTime directly since this will be modified by Pinot + m[WfIDTextSearch] = wid // used for text search which can improve the partial match performance + m[RunIDTextSearch] = rid // used for text search which can improve the partial match performance + m[WfTypeTextSearch] = workflowTypeName // used for text search which can improve the partial match performance SearchAttributes := make(map[string]interface{}) var err error