Serializing as stream instead of string
See original GitHub issueI’m trying to create an index over a large dataset and I want to separate the script that’s creating the index from the script that’s using the index. The index creation seems to work very well, but when I use index.export()
, I’m getting a RangeError: Invalid string length
error. Is there a way to export the index as a file without getting this error? A possible solution would be to allow exporting via a stream that could be written to a file directly.
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Can I Serialize XML straight to a string instead of a Stream ...
Save this question. Show activity on this post. This example uses a StringWriter to hold the serialized data, then calling ToString() gives the...
Read more >serialize and deserialize c# class into string - MSDN - Microsoft
when im serializing and deserializing the very same class from a file it works just fine. so it is possible for example to...
Read more >ObjectOutputStream (Java Platform SE 7 ) - Oracle Help Center
To serialize an enum constant, ObjectOutputStream writes the string returned by the constant's name method. Like other serializable or externalizable objects, ...
Read more >ObjectOutputStream in Java - write Object to File - DigitalOcean
The process of converting object to stream is called serialization in java. Once an object is converted to Output Stream, it can be...
Read more >Different Serialization Approaches for Java - Baeldung
Serialization is the process of converting an object into a stream of bytes. That object can then be saved to a database or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please change over to the version >= 0.7.x, thanks a lot.
@ts-thomas Thanks for the quick reply! I’m currently using FlexSearch in Node.js. Glad to hear that native serialization capabilities will be supported soon. After posting the issue, I helped myself by adding an option to export the
payload
array instead of stringifying it, but a proper implementation would be better of course. The exported file is about 1.5 GB in size, currently I’m not even sure if our virtual machines can deal with that index in memory. 😅