algolia / algolia/algoliasearch-client-java

partialUpdateObject remove some fields

Open
#781 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
52
Forks
33
PR merge metrics
No merged PRs in 30d

Description

- 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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported case with the Java client's partialUpdateObject and restricted attributesToRetrieve. Inspect the partial-update entry point and its existing tests, if present, to determine why fields omitted from the retrieved object are removed; done means updating selected fields while preserving date and subSource.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.