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.It works fine when hosted in preview on localhost but when its pushed to server it breaks
What's the error?
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
- Can't really use the S3 storage device
hi, I've linked my local MinIO Instance (it's just for testing, not for prod.) to my appwrite instance, when i'm uploading a file it's getting uploaded to the S...
- Next.js SSR Site Times Out on First Visi...
Hey everyone, I'm running a Next.js SSR site on a self-hosted Appwrite server (v1.9.0), and I've noticed a strange behavior that I'm hoping someone can help me...
- Quota not resetting
hi, im using appwrite's free tier plani hit my read limts last month and the billing cycle said it would reset on june 4th but that is today, the billing cycle ...