-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Bug Report: Can't create an index on string if string size is too big #6129
Comments
Checked in latest version 1.4.1, still cannot create an index with type "key", only possible using Fulltext. |
@joeyouss |
Facing similar issue on 1.4.2 Self Hosted Instance. Size of the string attribute is 128 and same issue for Strings[] array attribute |
@noob8boi Do you get a PDO error? |
@fogelito I see this error in |
@noob8boi , Thanks, that's good. |
@fogelito yes an array of string.. tried with both 64 and 128 length. Then I created a fulltext index for that single attribute but failed and same happened for a normal string attribute - 128 length - fulltext index. I think this error is only happening in a collection where i had fulltext index already on an array of strings attribute but then i deleted that attribute without deleting its fulltext index |
@noob8boi We do not check length for fulltext indexes, so it feels like between delete and reCreate something is not updated properly, I will try to reproduce.. |
@fogelito I think it's happening because of the unique url index. As soon as I deleted the unique URL index from that collection I was able to create full text index as expected but I am unable to create unique URL index. So deleting the array of string attribute wasn't the real cause. It was the pre existing unique url index. |
@noob8boi Let's try to reproduce this case. Can you give me information about that unique index? |
@fogelito we cant actually reproduce this because in appwrite 1.4.2 instance I am unable to create an unique index on URL attribute. We will need a pre existing collection with a unique index on required URL attribute and then migrate that instance from lets say 1.3.8 to 1.4.2.. After that u wont be able to create any new index whether its key/fulltext in the same collection. Just my guess tho |
OOh now I got it, URL field is default set to 2000 length, that's is why you can't create a unique index, there is a limit validation for this. |
gotcha 👍 |
Closing as expected behaviour |
👟 Reproduction steps
👍 Expected behavior
The index should create
👎 Actual Behavior
Index fails to create on Cloud:
Error in 1.4:
The problem is on previous versions of Appwrite, it was possible to create an index on 1 big string attribute. We should preserve that functionality.
🎲 Appwrite version
Appwrite Cloud
💻 Operating system
Linux
🧱 Your Environment
No response
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: