Okay Ive made a bad move. I have a username attribut in a collection and I wanted to change its size. So for that I had to delete it and recreate it. Except that I had a "username" index that was bound to this attribute. So now when I want to recreate a "username" index it doesn't work because it must still exist in the Appwrite server. This is a problem I had before on a selfhosted Appwrite instance. But as here I use the cloud I can't correct the error myself...So when we delete an attribute, the linked indices are not deleted completely
Summary
The user deleted an attribute with an index in their Appwrite project but is unable to recreate the index. They tried recreating the project but still encountered the same issue. They also noticed that when retrieving a document in their NextJS app, they still get the previous value of the deleted attribute. They attempted to create a function for deleting the index but it did not work. The user suspects that the error is only on the server and not visible in the console. They realize that the problem is caused by not completely deleting the linked indices when deleting an attribute.
Solution: The user needs to contact Appwrite support to resolve the issue with
Drake
Jun 27, 2023, 13:03
What error do you get when you try to create the index?
What's your project id?
loup
Rank 3: Container
Jun 27, 2023, 13:05
Ive no error in the console. I guess like the last time, the error is only on the server
loup
Rank 3: Container
Jun 27, 2023, 13:05
Ive try to create a function for deleting the Index but not working too
loup
Rank 3: Container
Jun 27, 2023, 13:05
my project id : 648cd565d979363284c1
loup
Rank 3: Container
Jun 27, 2023, 13:40
That so weird. Ive deleted the 'username' attribut and recreate one so my document shouldnt have username like that :
loup
Rank 3: Container
Jun 27, 2023, 13:41
But when I get the document in my NextJS app I still get the previous value of username
loup
Rank 3: Container
Jun 27, 2023, 15:07
Well Ive recreate my Appwrite project and deleted the one with index issue
Drake
Jun 27, 2023, 15:28
So how do you know something is wrong?
Drake
Jun 27, 2023, 15:29
Are you calling getDocument in your nextjs app?
loup
Rank 3: Container
Jun 27, 2023, 15:38
Because ive got the failed icon on the index
loup
Rank 3: Container
Jun 27, 2023, 15:39
And the new index didn't work so
Drake
Jun 27, 2023, 18:45
I see.
So do things work now after recreating the collection?
loup
Rank 3: Container
Jun 27, 2023, 18:48
Ive reacreate the entire project to make a fresh setup so everything works for now
loup
Rank 3: Container
Jun 27, 2023, 18:48
But ive just try to recreate a project with the older project id, I got an error : Project with the requested ID already exists. That normal ?
loup
Rank 3: Container
Jun 27, 2023, 18:49
I just ask because maybe the project is not propely deleted
Drake
Jun 27, 2023, 23:25
Ya...there might be some PR recently to fix that problem