We had deployed Temporal Cluster using Helm charts previously and all been fine. But we now need to move to a phase of work in which we need advanced visibility (to list based on custom search attributes).
Today we attempted to add Elasticsearch as the visibility store and deployed separate pods for Elasticsearch and hooked it all up with the Helm charts. However, nothing we did seemed to overcome the error we kept seeing - ListWorkflowExecutions failed: elastic: Error 400 (Bad Request): all shards failed [type=search_phase_execution_exception], root causes: No mapping found for [CloseTime] in order to sort on [type=query_shard_exception]
via the UI or tctl
.
We even nuked the deploy and main persistence store (RDS instance of Postgres) as we wondered if there was some indexing issue and we had the luxury to do this as its just greenfield work for now. However no difference.
We searched different places in the forum and elsewhere and tried to look at different things. One suggestion that came up was to manually create the mappings ourself but this seems to be of a maintenance headache going forward?
Querying the /_mapping
endpoint we got the following:
{
"temporal_visibility_v1_dev": {
"mappings": {
"properties": {
"ExecutionStatus": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"ExecutionTime": {
"type": "date"
},
"NamespaceId": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"RunId": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"StartTime": {
"type": "date"
},
"TaskQueue": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"VisibilityTaskKey": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"WorkflowId": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"WorkflowType": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
which seemed to be all the Storage mappings
you get when you run tctl get-search-attributes...
, but none of the default System search attributes
(hence why its immediately complaining about CloseTime
not being mapped)…
We are using v1.21.1 of Temporal and possibly looking to bump to latest version if we need to try. We are using v8 of Elasticsearch.
Any ideas??