How to add a custom Search Attribute to a Cluster using tctl
note
The Temporal tctl documentation covers version 1.16 of the Temporal CLI.
Use the following command to add a custom Search Attribute to your Temporal Cluster.
tctl admin cluster add-search-attributes --name <SearchAttributeName> --type <SearchAttributeValueType>
Search Attribute names are case sensitive.
The possible values for --type
are:
- String
- Keyword
- Int
- Double
- Bool
- Datetime
note
Due to Elasticsearch limitations you can only add new custom Search Attributes but not rename or remove existing ones.
Local testing
If you are adding custom Search Attributes to a Cluster running from the docker-compose-es.yml
file in the temporalio/docker-compose repo, make sure to increase the Docker memory to more than 6 GB.