Hi, is there a way to insert an item into a string...
# community-help
j
Hi, is there a way to insert an item into a string array field? I have a schema like
{ items: string[] }
and I'd like to add an item to the
items
array. I could retrieve the items currently in it, add the new item to that array, and update which would overwrite the
items
array and would work, but that seems less efficient than just adding an item to
items
directly
j
We don’t support adding to arrays at the moment. We’re tracking it here: https://github.com/typesense/typesense/issues/221 Could you add your use case to that issue, so we have context when we build it?
Separately, I would recommend adding to your primary data store first and then read the data from there in full and upsert into Typesense
You don’t want to store the only copy of the data in Typesense since it is not a primary data store.
j
Makes sense, thank you