BloodThermic
TypeScript
"646587b51b84a01f2ba8",
response.$id,
"collectionId",
"fulltext",
["collectionId"],
["ASC"]
);```
works for localhost but when built into production it breaks and does not create attribute.
TL;DR
Production code breaks because the attribute `collectionId` is not available. Works fine on localhost. Problem arises in production.
Solution: Change `"collectionId"` in the `databases.createIndex` method to the correct attribute name to fix the issue. BloodThermic
It works fine when hosted in preview on localhost but when its pushed to server it breaks
Evdog
What's the error?
BloodThermic
TypeScript
[Error] Timestamp: 2024-03-07T01:40:41+00:00
[Error] Method: POST
[Error] URL: /v1/databases/:databaseId/collections/:collectionId/indexes
[Error] Type: Appwrite\Extend\Exception
[Error] Message: Attribute not available: collectionId
[Error] File: /usr/src/code/app/controllers/api/databases.php
[Error] Line: 2486
Recommended threads
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...