How to save index on the disc for future use?

28 views
Skip to first unread message

Hamid Bagheri

unread,
Sep 16, 2016, 12:58:18 PM9/16/16
to concurrent-trees-discuss
Hello,
I was using prefix tree as an index , so the time for building index is huge. I was thinking how to save the tree on the disk for future use?

Niall Gallagher

unread,
Sep 18, 2016, 7:04:51 PM9/18/16
to concurrent-t...@googlegroups.com
Hi Hamid,

One option is to consider using a CharSequence-based NodeFactory which should allow the tree to be built faster than the array-based node factories. However, read about the pros and cons of different node factories to ensure it’s suitable for your application.

Another option is to serialize the tree and to save the serialized representation to disk. However Java’s built-in (de-)serialization is not especially fast, so you’ll need to test this for your application.
You could also consider using something like Kryo to serialize the tree as an alternative to Java's built-in serialization. I have not tested this, but Kryo is highly recommended.

HTH,
Niall

On 16 Sep 2016, at 17:58, Hamid Bagheri <bagher...@gmail.com> wrote:

Hello,
I was using prefix tree as an index , so the time for building index is huge. I was thinking how to save the tree on the disk for future use?


--
-- You received this message because you are subscribed to the "concurrent-trees-discuss" group.
http://groups.google.com/group/concurrent-trees-discuss
---
You received this message because you are subscribed to the Google Groups "concurrent-trees-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to concurrent-trees-d...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages