Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Exported Keys of a DocumentIndex have improper format #260

Closed
samuelnunoo opened this issue Aug 18, 2021 · 1 comment
Closed

[Bug] Exported Keys of a DocumentIndex have improper format #260

samuelnunoo opened this issue Aug 18, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@samuelnunoo
Copy link

samuelnunoo commented Aug 18, 2021

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

//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") 
@ts-thomas ts-thomas self-assigned this Oct 2, 2022
@ts-thomas ts-thomas added the bug Something isn't working label Oct 2, 2022
@ts-thomas
Copy link
Contributor

This is now fixed in v0.7.23
Further improvements to provide Promise.all() compatible export ist coming in next version.

ts-thomas added a commit that referenced this issue Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@ts-thomas @samuelnunoo and others