Issue with Upserting Documents in Typesense Collection
TLDR Rahul has issues with upserting many documents on Typesense. Kishore Nallan mentioned it's a JS client issue and smaller document numbers or a newer version would work.
Apr 05, 2022 (19 months ago)
Rahul
07:10 AMI've one collection in typesense which has 33 columns. I'm upserting around 20000 documents at a single time with the batch_size 500 but it doesn't work. It throws the error "RangeError: Too many properties to enumerate". So if anyone knows then please get me a solution and also let me know if I'm doing anything wrong.
Thanks in advance
Kishore Nallan
07:12 AMRahul
07:27 AMKishore Nallan
07:31 AMThis happens due to a JS limitation: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object.
We added a work around here: https://github.com/typesense/typesense-js/pull/88
So it should work in recent JS client versions.
Kishore Nallan
07:34 AMRahul
07:35 AMKishore Nallan
07:39 AMTypesense
Indexed 2779 threads (79% resolved)
Similar Threads
Importing data to Typesense Cloud with JS client
Zaiste attempted to import data to Typesense Cloud but encountered an error. Kishore Nallan explained the error was due to server side backpressure and suggested a curl approach for the import.
Resolving Typesense Documents Import Error
Aljosa experienced an error while using typesense `documents().import()`, related to handling of large document arrays. Jason clarified that batch_size controls server-side batching, not client-side. He advised splitting arrays to address the issue and committed to elaborating its functionality in the docs. Aljosa proposed amending the TypeScript types to accommodate batch_size in the import options.
Troubleshooting Typesense Document Import Error
Christopher had trouble importing 2.1M documents into Typesense due to memory errors. Jason clarified the system requirements, explaining the correlation between RAM and dataset size, and ways to tackle the issue. They both also discussed database-like query options.