Is it possible to execute `update by query` in bu...
# community-help
j
Is it possible to execute
update by query
in bulk? It would be very nice to have support for that in when executing imports (having a separate filter per document)
k
j
As I understand it, that can be used to update many documents matching one filter. What I want to more like conditional update per document. I could solve that by executing many update by query request (one request per document), but what I’m looking for is a way to do that in bulk.
j
Could you elaborate on the scenario where you need to do that style of conditional update?
j
Collection consists of products and we receive offers from e-commerce sites. We have a field that holds the lowest in-stock price (and which store it belongs to). When we receive a price update from a store, we only want to update the price if it is lower then the previous price (or if the currently stored lowest price is from the same store, then we should update with the new price)
j
I see. I would recommend doing updates like this on your primary datastore first, which should have support for conditional update statements... And then sync the final copy of the data into Typesense