
I've been trying to run a single query where I find multiple documents by a list of document ids. I found out you can find multiple documents by an array by using Query.search, if the attribute has an index with fulltext as type. So in order to find multiple documents I want to add a fulltext index on the $id field. When I try to add this index I get this error back:
{
"message": "Invalid `key` param: Parameter must contain at most 36 chars. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char",
"code": 400,
"type": "general_argument_invalid",
"version": "1.4.7"
}
Is it in any way possible to do query with an array as input?

first of all, if you want to filter by document ids, you don't need Query.search()
. You can use Query.equal('$id', [id1, id2, id3])
.
secondly, when you tried creating your index, what did you put as the key?

Ahh, now I feel stupid. But thank you, that works 😅 My input when creating the index was:
{
"key":"$id",
"type":"fulltext",
"attributes":[],
"orders":["ASC"]
}

ya, $id is now allowed for key. FYI, key is just a name for you. the important part in creating indexes is included the attributes in the attributes array

Ah, that makes sense. Thank you!

[SOLVED] Unable to add fulltext index to $id field
Recommended threads
- 404 error when navigating to the team fr...
the version i m running is `1.7.4` as far as i can tell everything is working fine except for this weird bug in the video. when monitoring the appwrite and app...
- Query params are way too limiting in ter...
I was trying to list rows in a table that do not already exist in another table. I retrieved around 260 row IDs which are 13 characters in length each, and then...
- [Node.js SDK] Bypass 2GB file limit?
Hello. Using either InputFile.fromPath or InputFile.fromBuffer throws this error: File size (2295467305) is greater than 2 GiB Bucket limit etc. is setup corre...
