# Error in History service with advanced visibility enabled

**URL:** <https://community.temporal.io/t/error-in-history-service-with-advanced-visibility-enabled/8108>\
**Category:** Community Support\
**Tags:** history, advanced\_visibility\
**Created:** [May 2, 2023, 10:20am UTC](https://community.temporal.io/t/error-in-history-service-with-advanced-visibility-enabled/8108 "2023-05-02T10:20:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravikiran](https://avatars.discourse-cdn.com/v4/letter/r/e480ec/32.png) [@ravikiran](https://community.temporal.io/u/ravikiran)\
**Post date:** [May 2, 2023, 10:20am UTC](https://community.temporal.io/t/error-in-history-service-with-advanced-visibility-enabled/8108/1 "2023-05-02T10:20:40Z")

</div>

hi,

we have setup a new Temporal cluster with advanced visibility enabled. We have created the index by following the documentation.

server version: 1.20.1  
ui: 1.14.0  
ES: 7.10.2

All the services startup and workflow executions complete. However we are not able to see the workflows in UI.  
Also, we are seeing below error in history service

```auto
{"level":"error","ts":"2023-05-02T10:08:24.367Z","msg":"ES request failed.","component":"indexer-es-processor","es-response-status":400,"es-response-error":"failed to parse field [CloseTime] of type [long] in document with id '0EFFE9A20F12449692DC969BE5B4CB7A@AXkBCgA-SAP-shuna-610406936225-0~42b3436a-9dae-4f06-8376-b88f58216778'. Preview of field's value: '2023-05-02T10:07:37.022666766Z'","key":"263~1048643","es-doc-id":"0EFFE9A20F12449692DC969BE5B4CB7A@AXkBCgA-SAP-shuna-610406936225-0~42b3436a-9dae-4f06-8376-b88f58216778","es-request":"{\"index\":{\"_index\":\"temporal-visibility-item-perf-v20-adv-es\",\"_id\":\"0EFFE9A20F12449692DC969BE5B4CB7A@AXkBCgA-SAP-shuna-610406936225-0~42b3436a-9dae-4f06-8376-b88f58216778\",\"version\":1048643,\"version_type\":\"external\"}}\n{\"CloseTime\":\"2023-05-02T10:07:37.022666766Z\",\"ExecutionDuration\":30131286770,\"ExecutionStatus\":\"Completed\",\"ExecutionTime\":\"2023-05-02T10:07:06.891379996Z\",\"HistoryLength\":42,\"HistorySizeBytes\":2089388,\"NamespaceId\":\"946f8528-4a9b-498e-9b31-27f0a998509e\",\"RunId\":\"42b3436a-9dae-4f06-8376-b88f58216778\",\"StartTime\":\"2023-05-02T10:07:06.891379996Z\",\"StateTransitionCount\":9,\"TaskQueue\":\"ITEM_INGESTION\",\"VisibilityTaskKey\":\"263~1048643\",\"WorkflowId\":\"0EFFE9A20F12449692DC969BE5B4CB7A@AXkBCgA-SAP-shuna-610406936225-0\",\"WorkflowType\":\"ItemSetupV2Workflow\"}","logging-call-at":"processor.go:281","stacktrace":"go.temporal.io/server/common/log.(*zapLogger).Error\n\t/home/builder/temporal/common/log/zap_logger.go:150\ngo.temporal.io/server/common/persistence/visibility/store/elasticsearch.(*processorImpl).bulkAfterAction\n\t/home/builder/temporal/common/persistence/visibility/store/elasticsearch/processor.go:281\ngithub.com/olivere/elastic/v7.(*bulkWorker).commit\n\t/go/pkg/mod/github.com/olivere/elastic/v7@v7.0.32/bulk_processor.go:588\ngithub.com/olivere/elastic/v7.(*bulkWorker).work\n\t/go/pkg/mod/github.com/olivere/elastic/v7@v7.0.32/bulk_processor.go:501"}

```

Appreciate any help.

---

<div class="post-metadata">

**Author:** ![ravikiran](https://avatars.discourse-cdn.com/v4/letter/r/e480ec/32.png) [@ravikiran](https://community.temporal.io/u/ravikiran)\
**Post date:** [May 3, 2023, 11:09am UTC](https://community.temporal.io/t/error-in-history-service-with-advanced-visibility-enabled/8108/2 "2023-05-03T11:09:13Z")

</div>

Figured it out.  
Index name should match the pattern “temporal\_visibility\_v1\_\*” mentioned in the index\_template\_v7.json.  
Since the index name was not matching, the data types were created with default types and hence the error.
