Exported Keys of a DocumentIndex have improper format.
This can be reproduced by create a nested document index, exporting the keys. When you try to reimport the keys you'll see that they'll have the format "field1-field2..." instead of "field1:field2" which leads to an undefined error.
After messing around with different key formats I found that this works
//Note result is the exported index data
const newIndex = new Document(config)
for (const r in result) {
let string = r.replace("-",":")
console.log(string)
newIndex.import(string,result[r]) //
}
newIndex.search("Whales")
Issue
Exported Keys of a DocumentIndex have improper format. This can be reproduced by create a nested document index, exporting the keys. When you try to reimport the keys you'll see that they'll have the format "field1-field2..." instead of "field1:field2" which leads to an undefined error.
After messing around with different key formats I found that this works