#assaxor_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1230625555901321247
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there!
I think each operator is evaluated sequentially, so I don't think you can do something like (A OR B OR C) AND D.
Do you have an example set of products and the field you want to use in the query, e.g., are you querying based on name or something else?
I'm using metadata, it is something like:
active:"true" AND (metadata["key"]:"value1" OR metadata["key"]:"value2" OR metadata["key"]:"value3" OR metadata["key"]:"value4")
there maybe mupltiple products satisfying the metadata constraints, but I only want the active ones
Is the query above returning inactive products that match one of the metadata key/value pairs?
let me double check
Is the query above returning inactive products that match one of the metadata key/value pairs?
Yes
I remove the active:true filter
because parenthesis are not supported
I also received this when trying both AND and OR:
Queries cannot have a mix of AND and OR.
đ˘
Ah, I see! That makes sense, we call this out here: https://docs.stripe.com/search#query-structure-and-terminology
AND and OR operators are mutually exclusive.
So I think you'll need to either run four queries for active: true AND metadata... or a single query for metadata...OR...metadata... and filter the resuls for active producs