Hello! I currently have a collection with the foll...
# community-help
d
Hello! I currently have a collection with the following field/index, just a
string[]
type
Copy code
{ name: 'contact.tag_ids', optional: true, sort: false, type: 'string[]' }
Sometimes, we have documents with no tag IDs, which we typically upsert an empty array
[]
for. I recently noticed that if a tag was added to the array
tag_ids: ['tag1']
for example and then removed (so back to an empty array
tag_ids: []
) - it seems like that value that was added and removed is still in memory/index. Querying by that tag ID will still return the document even though it has an empty array now. This only seems to be happening when it's updated to have an empty array of tag IDs. Is there a different way we should be setting empty arrays so that the index properly resets? Or is this potentially an issue on our Typesense server (v26)? Or potentially a bug?
Also just to add - part of the reason we send an empty array is because we're doing an update rather than a full upsert in most cases like this - and I don't think it's possible to remove field/value with just an update
k
We recently fixed some edge cases related to this. Please use
29.0.rc9
RC build and let me know if you still face this issue.
👀 1
d
Hi Kishore! Glad to hear this might be addressed in newer builds. Are the fixes available in v28 by chance? I'm not sure if we'll be able to update to an un-official version unfortunately, but I'll chat with my team! If they're not, I think I might be able to work around it by indexing a random value like
no_tag_ids
or something just so the array isn't empty - just wanted to share this idea in case anyone else runs into this!
k
Generally we publish RC builds for bug patches and then once enough feature and patches accumulate, we do a stable release. Given that stable releases themselves have bugs (like in this case), we don't necessarily look at RC builds as being unstable as such. We do have many customers using RC builds on production.
🙌🏻 1
d
that's good to know - I'll pass that along to my team - thank you!