Skip to content

CreateIfNotExist should not be the default #750

Open
@greg0ire

Description

@greg0ire
  • 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.

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