Elasticsearch queries with multiple conditions not working?

I’m trying to use tctl (1.8.2) to list my workflows based on multiple criteria, but it seems like only the first condition of the where clause is being honored. Example: This search seems to run correctly:

tctl wf list --query 'WorkflowType="CreateConfigurationWorkflow"'

Whereas this one does not seem to apply the second condition:

tctl wf list --query 'WorkflowType="CreateConfigurationWorkflow" AND WorkflowID="c7341eab-a73d-4af3-9fda-c5fa2301efdf"'

Am I formatting the query incorrectly?

With you second query you should get an error:

Error: Failed to list workflow.
Error Details: invalid search attribute

And this is because search attributes names are case sensitive. WorkflowID should be WorkflowId.

Honestly, it looks like I can put anything there and I don’t receive any errors… it only cares about the first condition. This does not throw an error for me…

tctl wf list --query 'WorkflowType="CreateConfigurationWorkflow" AND dsfgdfsgsdg_ ahflawe ljfha '

Is your server version is also 1.8.2? What is visibility persistence? Cas or MySQL or ES?

Yes, the server is 1.8.2 as well. We are using Cassandra for “visibilityStore” and ES for “advancedVisibilityStore”.

Oof, OK, once again I am the victim of my own stupidity. :exploding_head: I’ve been using a script to run tctl inside of a docker container, and the command line input wasn’t being parsed correctly. Disregard, and sorry to waste your time!

Great! Because I just checked out exact 1.8.2 and wasn’t able to reproduce it.