Greetings of the day... Hi <@U01NZ4D0LDD> / <@U01...
# community-help
s
Greetings of the day... Hi @Jason Bosco / @Kishore Nallan if possible update the document except for the _*id* field like (product_id,item_code,model_code ) it could be better for multiple update documents based some other fields_
k
You want to update some fields based on a filter condition?
s
thanks, for the quick reply @Kishore Nallan yes i need update documents except id field
k
Feature is available in upcoming 0.25 release. Example:
Copy code
export FILTER_CLAUSE="points:1000"
curl "<http://localhost:8108/collections/docs/documents?filter_by=$FILTER_CLAUSE>" -X PATCH \
        -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" -d '{"title": "Title with 1000 points."}'
The above will update the title of all documents that has a points field value of
1000
. Is this what you want?
s
yes @Kishore Nallan its working fine thanks for the update
👍 1
@Kishore Nallan below mentioned error thows prod environment { "message": "Not Ready or Lagging" }
k
What command did you run?
s
curl --location --request PATCH 'https://mycluter.typesense.net/collections/myproducts/documents?filter_by=mymodel_code:"gripp-focal-camera-lens-2-in1-protection-tempered-glass-for-apple-iphone-14-14-plus"' \ --header 'X-TYPESENSE-API-KEY: mytypesensekey' \ --header 'Content-Type: application/json' \ --data-raw '{ "rating": 5, "review_count" : 81 }'
i have tried dev and stage its working but my prod its throws error above mentioned
k
Commands that touch the whole cluster can take some time to finish
s
ok @Kishore Nallan i will check and revert back to you
FYI
k
Try again now.
There was probably a bad query that was hogging the CPU. We have better mechanism for this in recent builds. I've fixed this for you for now.
I see all requests being sent to only 1 node on your cluster.