Partial workflow id match while using list filter

Hey, we are looking to get a list of all running workflows using temporal visibility and list filter. Our workflows have workflow id’s that look like abcd-1234-5678. We want to filter all workflows that start with abcd-1234-. As far as I can tell from the docs, this is not possible but just wanted to get a confirmation if i’m missing something?

That’s correct. WorkflowId is indexed with Keyword type which optimizes for exact match performance but lack of partial search support.

1 Like

I’d like to correct this answer for future reference. Turns out we can apply lexical range on the Keyword type to achieve partial search, e.g.

WorkflowId between "abcd-1234-" and "abcd-1234-~"

Also, if you happen to have workflows with ID, e.g.

abcd100
abcd101
.
.
abcd199

Search WorkflowId between "abcd197" and "abcd199" will return the workflows: abcd197, abcd198 and abcd199