I looked at what format the data is stored in in elasticsearch.
Query:
GET http://<es_addr>/temporal_visibility_v1_dev/_search
{
"query": {
"match_all": {}
}
}
Response:
{
"took": 0,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 2591,
"relation": "eq"
},
"max_score": 1.0,
"hits": [
{
"_index": "temporal_visibility_v1_dev",
"_type": "_doc",
"_id": "execute-flow-a43bb9a9-335e-42af-a9e9-335a2741359f~77a7e294-2d00-402a-8c9a-b1410f69d92d",
"_score": 1.0,
"_source": {
"ExecutionStatus": "Running",
"ExecutionTime": "2024-07-24T00:15:09.833876433Z",
"NamespaceId": "b2151f68-654f-49a2-a996-4039e78296bc",
"RunId": "77a7e294-2d00-402a-8c9a-b1410f69d92d",
"StartTime": "2024-07-24T00:15:09.833876433Z",
"TaskQueue": "execute-flow-task-queue",
"VisibilityTaskKey": "1~660605411",
"WorkflowId": "execute-flow-a43bb9a9-335e-42af-a9e9-335a2741359f",
"WorkflowType": "ExecuteFlowWorkflow",
"flowId": "018fcbab-6642-7b8a-ab59-43ded6b563bb",
"personId": "0190e212-1f80-7b7a-bd1e-8d0b30f42314",
"reservationId": "0190e212-22d2-7816-b79a-6ed3a4d53ca6",
"workspaceId": "018c1bec-682c-7518-992a-ec875e8efe63"
}
},
{
"_index": "temporal_visibility_v1_dev",
"_type": "_doc",
"_id": "execute-flow-80815c40-e479-4b3d-875f-952f25913258~ec9d20a9-b993-472d-a97b-932d1a71176a",
"_score": 1.0,
"_source": {
"ExecutionStatus": "Running",
"ExecutionTime": "2024-07-24T00:15:09.790856572Z",
"NamespaceId": "b2151f68-654f-49a2-a996-4039e78296bc",
"RunId": "ec9d20a9-b993-472d-a97b-932d1a71176a",
"StartTime": "2024-07-24T00:15:09.790856572Z",
"TaskQueue": "execute-flow-task-queue",
"VisibilityTaskKey": "1~660605406",
"WorkflowId": "execute-flow-80815c40-e479-4b3d-875f-952f25913258",
"WorkflowType": "ExecuteFlowWorkflow",
"flowId": "018fcb83-6364-75c2-96cf-e077851b69dc",
"personId": "0190e212-1f80-7b7a-bd1e-8d0b30f42314",
"reservationId": "0190e212-22d2-7816-b79a-6ed3a4d53ca6",
"workspaceId": "018c1bec-682c-7518-992a-ec875e8efe63"
}
},
...
Here they are without the double quotes. I tried searching for workflow by worxpace id, but it didn’t come up in the response
Request:
GET http://<es_addr>/temporal_visibility_v1_dev/_search
{
"query": {
"match": {
"workspaceId": "018c1bec-682c-7518-992a-ec875e8efe63"
}
}
}
Response:
{
"took": 0,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 0,
"relation": "eq"
},
"max_score": null,
"hits": []
}
}
I then looked at the index schema and saw that these fields were not present
Request:
GET http://<es_addr>/temporal_visibility_v1_dev
Response:
{
"temporal_visibility_v1_dev": {
"aliases": {},
"mappings": {
"dynamic": "false",
"properties": {
"BatcherNamespace": {
"type": "keyword"
},
"BatcherUser": {
"type": "keyword"
},
"BinaryChecksums": {
"type": "keyword"
},
"BuildIds": {
"type": "keyword"
},
"CloseTime": {
"type": "date_nanos"
},
"ExecutionDuration": {
"type": "long"
},
"ExecutionStatus": {
"type": "keyword"
},
"ExecutionTime": {
"type": "date_nanos"
},
"HistoryLength": {
"type": "long"
},
"HistorySizeBytes": {
"type": "long"
},
"NamespaceId": {
"type": "keyword"
},
"RunId": {
"type": "keyword"
},
"StartTime": {
"type": "date_nanos"
},
"StateTransitionCount": {
"type": "long"
},
"TaskQueue": {
"type": "keyword"
},
"TemporalChangeVersion": {
"type": "keyword"
},
"TemporalNamespaceDivision": {
"type": "keyword"
},
"TemporalSchedulePaused": {
"type": "boolean"
},
"TemporalScheduledById": {
"type": "keyword"
},
"TemporalScheduledStartTime": {
"type": "date_nanos"
},
"WorkflowId": {
"type": "keyword"
},
"WorkflowType": {
"type": "keyword"
}
}
},
"settings": {
"index": {
"routing": {
"allocation": {
"include": {
"_tier_preference": "data_content"
}
}
},
"search": {
"idle": {
"after": "365d"
}
},
"number_of_shards": "1",
"auto_expand_replicas": "0-2",
"provided_name": "temporal_visibility_v1_dev",
"creation_date": "1721204508335",
"sort": {
"field": [
"CloseTime",
"StartTime",
"RunId"
],
"missing": [
"_first",
"_first",
"_first"
],
"order": [
"desc",
"desc",
"desc"
]
},
"number_of_replicas": "0",
"uuid": "Zah3i9SIRnShpPJOcq2sdQ",
"version": {
"created": "7170999"
}
}
}
}
}
In my first post you can see how I create search attributes. Do I understand correctly that temporal itself should have added these fields to the index schema in elasticsearch?