qdrant icon indicating copy to clipboard operation
qdrant copied to clipboard

Conditionally update payload

Open generall opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. Currently, user needs to know exact list of point IDs to perform a payload update. (API https://qdrant.github.io/qdrant/redoc/index.html#operation/update_points)

But in some cases it might be useful to specify update condition - set payload only on those points, which passes the filtering condition.

Describe the solution you'd like

Create additional optional parameter in payload API - filtering conditions. If this parameter is specified - instead of list of ids payload should be assigned to each point which satisfies filtering conditions. ids should become optional as well, in this case.

Describe alternatives you've considered

Create a separate API for this type of update

generall avatar Dec 28 '21 17:12 generall

Is the API referred to at https://qdrant.github.io/qdrant/redoc/index.html#operation/update_points, now the upsert points API at https://qdrant.github.io/qdrant/redoc/index.html#tag/points/operation/upsert_points?

russcam avatar Aug 07 '22 01:08 russcam

With upsert i guess it now makes more sense to create a separate operation 'Update Points Conditionally' in the API?

erare-humanum avatar Oct 21 '22 06:10 erare-humanum

For example, https://qdrant.github.io/qdrant/redoc/index.html#tag/points/operation/clear_payload have an option to select between point IDs and filter. I think all other relevant API should follow the same pattern

generall avatar Oct 28 '22 15:10 generall

Something like this for e.g set_payload? #1192

If it looks alright i could go ahead and implement the other relevant API

erare-humanum avatar Nov 07 '22 07:11 erare-humanum

Implemented in https://github.com/qdrant/qdrant/releases/tag/v0.11.5 , PR - https://github.com/qdrant/qdrant/pull/1249

generall avatar Dec 29 '22 10:12 generall