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

Partial update not removing fields #419

Closed
OlafurD opened this issue Oct 2, 2017 · 2 comments
Closed

Partial update not removing fields #419

OlafurD opened this issue Oct 2, 2017 · 2 comments

Comments

@OlafurD
Copy link

OlafurD commented Oct 2, 2017

Removing fields with partial update does not work. For example, if I have this JSON object in my algolia index:

{
	"name": "oli",
	"email": "oli@example.com",
	"objectID": 33
}

and then I execute a partial update:

val person = Person(objectID = 33, name = Some("oli"), email = None)
client.execute {
 partialUpdate from indexName `object` person
}

The email field is not removed from the object

@ElPicador
Copy link
Contributor

In Algolia, it's not possible to remove an attribute with a partial update.
If you want to do this you need to update the full object.

Does this answer to your question?

@OlafurD
Copy link
Author

OlafurD commented Oct 3, 2017

It does, thanks

@OlafurD OlafurD closed this as completed Oct 3, 2017
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

No branches or pull requests

2 participants