Skip to content

partialUpdateObject remove some fields #781

Open
@CedricJezequel

Description

@CedricJezequel
  • Algolia Client Version: 3.16.5
  • Language Version: JAVA

Description

We implemented a new agent which update existing items from an Algolia index and we observed that partialUpdateObject does not work as expected : some fields, not declared in attributesToRetrieved, are removed when saving an updated item.

Steps To Reproduce

  1. Having an Algolia index with data (ex: [objectID, title, text, url, source, date, subSource])
  2. Set attributesToRetrieved with back office configuration (ex: [objectID, title, text, url, source])
  3. Retrieve items from this index with more restrictions on attributesToRetrieved (ex: [objectID, title, text])
  4. Add a new field to item (ex: score)
  5. Save item with partialUpdateObject with only changed fields (ex:[objectID, title, score])
    => Items saved only have [objectID,title,text, url, source, score] fields and no more [date, subSource] fields

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