Issue with PATCH Request in Typesense
TLDR Saurabh is trying to update data using a PATCH request, but receives a "not found" message. Jason confirms the request looks fine and asks for the Typesense version being used.
Jun 07, 2023 (6 months ago)
Saurabh
01:25 PMJason
05:11 PMPATCH
request, not a PUT
requestSaurabh
06:38 PMSaurabh
06:39 PMurl = "<http://url/collections/program/documents?filter_by=id:64807bc70d6f083179a601a4>"
payload = json.dumps({
"costs": {
"currency": "USD"
}
})
Saurabh
06:40 PMJason
06:47 PMSaurabh
07:20 PMcurl --location --globoff --request PATCH '{{url}}/collections/program/documents?filter_by=id%3A64807bc70d6f083179a601a4' \
--header 'Content-Type: application/json' \
--header 'X-TYPESENSE-API-KEY: {{TYPESENSE_API_KEY}}' \
--data '{
"costs": {
"currency": "USD"
}
}'
Jason
07:43 PMTypesense
Indexed 3015 threads (79% resolved)
Similar Threads
Updating Documents and Fixing Error in Prod Environment
sahubar asked to update documents except for certain id fields. Kishore Nallan shared a future feature addressing this. Then, sahubar encountered an error in their prod environment. Kishore Nallan provided potential reasons and a temporary solution.
Manually Invalidating Cache in Typesense NPM Package Unsuccessful
Slavik asked about manually invalidating cache, with Kishore Nallan and Jason providing possible methods. These solutions did not resolve Slavik's issue, who was advised to open a GitHub issue for further investigation.
Typesense Server Bulk Import/Upsert Issue Resolved
Adam was confused about the discrepancy between the successful responses and the actual indexed data while working with a custom WP plugin integrating with Typesense. The issue was a bug related to fetching documents in the wrong order, not a Typesense problem.
Troubleshooting Typesense Connection Issue and Data Retrieval
Felix encountered issues connecting to a server-created typesense and retrieving data collections. Kishore Nallan and Jason provided guidance, highlighting errors in the original code and suggesting changes to the URL and curl command.
Issues with Importing Typesense Collection to Different Server
Kevin had problems migrating a Typesense collection between Docusaurus sites on different machines. Jason advised them on JSONL format, handling server hosting, and creating a collection schema before importing documents, leading to successful import.