Skip to content

partialUpdateObject in v5 client does not allow array values #1542

@sannie-treams

Description

@sannie-treams

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions