Skip to content
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

partialUpdateObject in v5 client does not allow array values #1542

Closed
sannie-treams opened this issue Aug 26, 2024 · 0 comments · Fixed by algolia/api-clients-automation#3486

Comments

@sannie-treams
Copy link

Using algoliasearch-client-javascript version 5.x (specifically: 5.1.1), it seems it's no longer possible to perform a partialUpdateObject request where one of the updated object fields has an array value. It only allows string or a BuiltInOperation.

For example:

client.partialUpdateObject({
  indexName: 'myIndex',
  createIfNotExists: false,
  objectID: '026e41ca-44f1-4871-b12c-73f504197300',
  attributesToUpdate: {
    myAttributeToUpdate: ['array-value-1', 'array-value2'] // error: not a string or BuiltInOperation
  },
});

This used to be possible in the v4 client and the algolia REST api supports it too. Can support for array values be re-added in the v5 client? Or is there some alternative syntax I should use for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant