Replace method triggering error if object does not exists

Description

I am using the Weaviate client in Python (4.15.2). I am trying to use the method collection.data.replace passing an uuid of the instance I want to replace and properties.

The description of the methods specificly mentions that if no object is found with that id, an object will be created. Although when using the method for with an id I know is not in the db, I get the following error:

UnexpectedStatusCodeError: Object was not replaced.! Unexpected status code: 500, with response body: {‘error’: [{‘message’: “no object with id ‘f6a5d8db-6082-59d3-b87d-9c191d78b3aa’”}]}

Is this intended? How can I upsert an object if not using replace then?

Server Setup Information

  • Weaviate Server Version: 1.31.3
  • Deployment Method: Sandbox
  • Multi Node? Number of Running Nodes:
  • Client Language and Version:
  • Multitenancy?: Yes

Any additional Information

hi @Edaulhiac !!

Welcome to our community :hugs:

That information is most probably wrong :grimacing:

Indeed, it will not replace or create the object. This can only be done with batch update.

I have raised internally so we can correct it.

Thanks for pointing it out!