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

CreateIfNotExist should not be the default #750

Open
greg0ire opened this issue Feb 9, 2024 · 0 comments
Open

CreateIfNotExist should not be the default #750

greg0ire opened this issue Feb 9, 2024 · 0 comments

Comments

@greg0ire
Copy link

greg0ire commented Feb 9, 2024

  • Algolia Client Version: v3.31.0
  • Language Version: 1.21

Description

Right now index.PartialUpdateObjects() creates an object if it does not exist. That object is very likely to be invalid from the point of view of clients, since it does not have all fields. I believe that a more sensible default when no option is supplied should be opt.CreateIfNotExists(false).

Note that this behavior is inconsistent with other SDKs such as the PHP sdk: https://github.com/algolia/algoliasearch-client-php/blob/0bc527d95150319d6e8fca6dae398e4ad376d4b6/src/SearchIndex.php#L207

Steps To Reproduce

Call index.PartialUpdateObjects() with an object that does not already exist in the index.

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

1 participant