Updating Documents and Fixing Error in Prod Environment
TLDR 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.
1
Jul 01, 2023 (3 months ago)
sahubar
10:31 AMHi Jason / 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
Kishore Nallan
10:38 AMsahubar
10:40 AMyes i need update documents except id field
Kishore Nallan
10:43 AMexport FILTER_CLAUSE="points:1000"
curl "" -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?
sahubar
10:53 AM1
sahubar
11:01 AM{
"message": "Not Ready or Lagging"
}
Kishore Nallan
11:02 AMsahubar
11:05 AM--header 'X-TYPESENSE-API-KEY: mytypesensekey' \
--header 'Content-Type: application/json' \
--data-raw '{
"rating": 5,
"review_count" : 81
}'
sahubar
11:06 AMKishore Nallan
11:10 AMsahubar
11:12 AMsahubar
11:14 AMKishore Nallan
11:15 AMKishore Nallan
11:16 AMKishore Nallan
11:17 AMTypesense
Indexed 2779 threads (79% resolved)
Similar Threads
Handling Kinesis Stream Event Batching with Typesense
Dui had questions about how to handle Kinesis stream events with Typesense. Kishore Nallan suggested using upsert mode for creation/update and differentiating with logical deletion. After various discussions including identifying and resolving a bug, they finalized to introduce an `emplace` action in Typesense v0.23.
Troubleshooting Issues with DocSearch Hits and Scraper Configuration
Rubai encountered issues with search result priorities and ellipsis. Jason helped debug the issue and suggested using different versions of typesense-docsearch.js, updating initialization parameters, and running the scraper on a Linux-based environment. The issues related to hits structure and scraper configuration were resolved.
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.
Docsearch Scrapper Metadata Configuration and Filter Problem
Marcos faced issues with Docsearch scrapper not adding metadata attributes and filtering out documents without content. Jason helped fix the issue by updating the scraper and providing filtering instructions.
Updating Documents by Query and Sorting by Float Fields
Saurabh asked how to update documents by query and whether float fields can be used for sorting. Kishore Nallan provided information on updating by query and advised using int64 type instead of float for unix timestamps.