the first attachment (with lessThanEqual
) is from the cloud function code. the second attachment is from the client-side code. and the third attachment shows my Indexes in appwrite console.
the client-side Query works fine. but in the cloud function, it says Index not found: createdBy,betDay
. I've tried creating one single Index including both createdBy
and betDay
. Then it throws a Server Error
Any idea why it's happening and how to make this work?
Any kinda help will be appreciated
1st of all, it looks like you're doing a Query.equal()
on createdBy
Will you be doing a Query.search()
?
just tried. it's still saying index not found
I'm just trying to understand what you need. Do you need to use the search query?
no. i need the equal query. i need all docs where createdBy
is equal to my passed "ID"
Nice. Can you create 1 key (instead of full text) index with both attributes?
says Search method requires fulltext
. and when I tried fulltext
type index, the index creation fails every time. no idea why
You said you didn't need to use the search query 🧐
i get what you're saying. i forgot to deploy my edits last time. but now when i'm trying to deploy, the deployment fails everytime. what could be the possible reason?
what do the logs say?
hi. sorry for the delay. the function is deployed successfully. but it's still not working. the log says Server Error
. the attachment shows my current code
Would you please check the docker logs for the appwrite container to find the 500 error? There should be a more detailed description
I'm a bit too noob. can you please guide me about where I'll find the docker log for appwrite container?
This might help: https://appwrite.io/docs/debugging#logs
DateTime::__construct(): Failed to parse time string (SatMar04202316:55:59GMT+0000(CoordinatedUniversalTime)) at position 0 (S): The timezone could not be found in the database
that's the message I got. I think it's having some problem with the DateTime type data in "betDay"
Oh. DateTime probably won't work. You'll need to pass an iso formatted string
That said, we should probably improve the error handling. Would you be able to create an issue?
i passed the Date
Object I get via Javascript. I passed the same while creating the document. isn't it weird that it can create doc with Date
objects, but fails in case of queries?
on github? yeah, I think I can. I may need to know what exact info should i mention there about this situation
In general, it's always good to include enough detail to make it clear and reproducible for others.
In this case, your code, what was actually sent in the network request or what the values passed into the queries were, and the error from the server is probably good.
Recommended threads
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...
- HTTP POST to function returning "No Appw...
Hi everyone, I’m running into an issue with my self-hosted Appwrite instance. I’ve set up my environment variables (APPWRITE_FUNCTION_PROJECT_ID, APPWRITE_FUNC...