#assaxor_api

1 messages ¡ Page 1 of 1 (latest)

uneven martenBOT
#

👋 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.

valid baneBOT
fervent flame
#

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?

broken zinc
#

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

fervent flame
#

Is the query above returning inactive products that match one of the metadata key/value pairs?

broken zinc
#

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. 

😢

fervent flame
#

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

broken zinc
#

Makes sense, seems like I'll go the second route as the number of products will be less

#

Thanks for the help!