API Queries and or

Give the 2 queries below - The first one works the second erros with
“code”: 2,
“codeName”: “BadValue”,
“name”: “MongoError”

I want to run and $or across 3 fields looking for a search term… (the 1st query is only to test if 3 condition on an $or work )

where={"$or":[{“objectId”:“UJsE5mPBE5”},{“title”:“Script writer”},{“dateGoLive”: “2021-11-11T11:00:00.813Z”} ]}

where={"$or":[{“objectId”:“UJsE5mPBE5”}, {“dateGoLive”: “2021-11-11T11:00:00.813Z”},{“title”:{"$text":{"$search":{"$term":“Job”}}}} ]}

It might be related to this MongoDB limitation: https://docs.mongodb.com/manual/reference/operator/query/or/#-or-and-text-queries

Do you Have index in place for the dateGoLive field?

No indexes for now.
I’ve got a regex working for the same, but it’s slow.
Do have to manage indexes from mongo ?

Yes. You will have to do that directly no MongoDB.

Ok . thank you - will update that -