// ApplyTypeMap set type for all valid search attributes which don't have it.
// It doesn't do any validation and just skip invalid or already set search attributes.
func ApplyTypeMap(searchAttributes *commonpb.SearchAttributes, typeMap NameTypeMap) {
search_attirbute.go
for saName, saPayload := range searchAttributes.GetIndexedFields() {
_, metadataHasValueType := saPayload.Metadata[MetadataType]
if metadataHasValueType {
continue
}