Indexing <String, Arraylist <Integer> using B-Tree
I am going to index 10 million titles with their identifiers (now their line numbers), the credits will be saved after their tokenization. The data structure should be something like <String, Arraylist<Integer>>. Strings will represent tokens, integers will represent row numbers.
I need to create this tool using: Java, read-only memory, and not use the RDBMS as much as possible. Since this data structure is volatile, I could not find any tools that support MultiMaps, with a> structure that will be indexed using BTree or any other persistent data structures.
I tried MapDB , but turned to accept only immutable, which in my case does not apply (Arraylist)
Any thoughts are appreciated.
What you need is called MultiMap. MapDB does not support these functions directly, but has multiple sets that are almost the same.
Example: https://github.com/jankotek/MapDB/blob/release-1.0/src/test/java/examples/MultiMap.java