algoliasearch-client-ruby icon indicating copy to clipboard operation
algoliasearch-client-ruby copied to clipboard

`#partial_update_objects` fails to accept options

Open vincedevendra opened this issue 3 years ago • 2 comments

  • Algolia Client Version: 2.2.2
  • Language Version: Ruby 2.7.5

Description

I'm getting 400 errors when trying to call index.partial_update_objects. See repro steps for more details.

Steps To Reproduce

Run the following:

client = Algolia::Search::Client.create(<app_id>, <api_key>)
index = client.init_index(<index_name>)

index.partial_update_objects([objectID: '123', attribute: 'value'], {createIfNotExists: true})
  # raises Algolia::AlgoliaHttpError (400: Invalid object attributes:createIfNotExists near line:1 column:114)

vincedevendra avatar Jan 12 '22 22:01 vincedevendra

Hi, Same error for me. It seems to be linked to this PR https://github.com/algolia/algoliasearch-client-ruby/pull/458. Some news ?

OlivierLeCloset avatar Jan 31 '22 16:01 OlivierLeCloset

What are the chances of PR https://github.com/algolia/algoliasearch-client-ruby/pull/458 getting merged? We are still on V1 but want to upgrade to V2 but we use the partial updates and need createIfNotExists to work.

nooysters avatar Aug 02 '22 20:08 nooysters

Hi all!

I think #458 may fix this indeed. We've released this in v2.3.0. I'm closing this issue for now, feel free to reopen in case the issue persists after upgrading.

Cheers!

DevinCodes avatar Sep 26 '22 08:09 DevinCodes