Deserializing #743
|
Hi, I am considering this library. I am confused by the parseIndex example code in the docs, to deserialize an index. If I serialize an index and send it over the wire to a front end client, it appears, from line 12, that the client needs both the options and the dataset to be able to deserialize the index. This seems pretty odd. Am I missing something? I just tried out lunr.js, and there is a single call to serialize an entire index with options, and a single call to deserialize the index on the other side, with no parameters. |
Replies: 1 comment
|
Apologies for the late reply. The index only stores the transformed/tokenized data used for searching — it doesn't store the original documents. When Fuse returns results, it needs to hand back the original objects, so the dataset is required alongside the index. It's a tradeoff: storing the full documents inside the index would make serialization simpler but would roughly double the payload size. |
Apologies for the late reply.
The index only stores the transformed/tokenized data used for searching — it doesn't store the original documents. When Fuse returns results, it needs to hand back the original objects, so the dataset is required alongside the index. It's a tradeoff: storing the full documents inside the index would make serialization simpler but would roughly double the payload size.