Hello, I use the version "0.23.0.rc69". Sometimes ...
# community-help
b
Hello, I use the version "0.23.0.rc69". Sometimes the request succeeds and sometimes not. This happens full randomly. Any idea?
j
Now that 0.23 is out publicly, I'd recommend upgrading to that.
Are you referring to search requests or write requests?
b
My bad Jason, Firewall issue. The version 0.23.0 is more stable than the rc?
👍 1
j
Bug-fixes-wise we went up to RC73 so it has more fixes.
b
Okay I'll upgrade to it. Thank you
👍 1
@Jason Bosco In order to update (upsert) an item in Typesense, should I include all of the fields? For example, I have a list of products with fields on each product like product_id, product_name etc. and I want to change only the expiration_date.
I get this message -> "message": "Field
published
has been declared as a default sorting field, but is not found in the document."
j
With action=upsert you can send partial fields and it will only update those fields, all others will stay intact (this was until v0.21.0). See below.
b
Should I include published field in upsert also?
j
You shouldn't have to 🤔 Could you share the full curl command that replicates this issue?
b
I don't do something special -> curl "http://localhost:8108/collections/companies/documents?action=upsert" -X POST \ -H "Content-Type: application/json" \ -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \ -d '{ "id": "124", "expiry_date": 1665273600, }'
I think in the previous version, we hadn't this issue
I have installed the v.0.23.0 on all nodes
j
Ah yes, we changed this behavior in v0.23.0 v0.22.2. You want to now use the "emplace" instead of "upsert" if you want to send partial documents
b
@Jason Bosco The Golang library needs an update -> https://github.com/typesense/typesense-go because emplace is not supported
j
CC: @Kishore Nallan @v-byte-cpu ^
k
Just to be clear:
upsert
requires the full document both in 0.22.2 and 0.23.0 -- I have just verified that there has been no change in this behavior in 0.23 release. See this example which doesn't work on either on 0.22.2 or 0.23.0 because it does not upsert a full document: https://gist.github.com/kishorenc/32537d8c51ee826e5d8badc5628348b7