Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document SearchAttributes parsing #154

Open
lorensr opened this issue Mar 3, 2022 · 0 comments · May be fixed by #155
Open

Document SearchAttributes parsing #154

lorensr opened this issue Mar 3, 2022 · 0 comments · May be fixed by #155
Labels
enhancement New feature or request

Comments

@lorensr
Copy link
Contributor

lorensr commented Mar 3, 2022

Is your feature request related to a problem? Please describe.

SearchAttributes:

// A user-defined set of *indexed* fields that are used/exposed when listing/searching workflows.
// The payload is not serialized in a user-defined way.
message SearchAttributes {
map<string, Payload> indexed_fields = 1;
}

I don't know from reading this proto how to specify search attribute types in StartWorkflowExecution. Possible types are:

enum IndexedValueType {
INDEXED_VALUE_TYPE_UNSPECIFIED = 0;
INDEXED_VALUE_TYPE_TEXT = 1;
INDEXED_VALUE_TYPE_KEYWORD = 2;
INDEXED_VALUE_TYPE_INT = 3;
INDEXED_VALUE_TYPE_DOUBLE = 4;
INDEXED_VALUE_TYPE_BOOL = 5;
INDEXED_VALUE_TYPE_DATETIME = 6;
}

image

https://docs.temporal.io/docs/concepts/what-is-a-search-attribute/#custom-search-attributes

Describe the solution you'd like

A comment explaining how the Payloads are parsed, for example:

// Each Payload has a metadata.type: IndexedValueType
// If payload.metata.type is INDEXED_VALUE_TYPE_DATETIME, payload.data should be an integer with milliseconds since epoch.

@lorensr lorensr added the enhancement New feature or request label Mar 3, 2022
@lorensr lorensr linked a pull request Mar 3, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant