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

Persistence of index #140

Open
jzakotnik opened this issue Nov 24, 2023 · 1 comment
Open

Persistence of index #140

jzakotnik opened this issue Nov 24, 2023 · 1 comment

Comments

@jzakotnik
Copy link

jzakotnik commented Nov 24, 2023

Is there a way to persist an existing itemjs index and reload it again for search later? This would be a great enhancement.

If I see it correctly, the index is built via lunr, so the serialisation might also be possible

@jzakotnik jzakotnik changed the title Persistence for indexj index Persistence of index Nov 24, 2023
@cigolpl
Copy link
Member

cigolpl commented Nov 25, 2023

This is an excellent suggestion. Implementing serialization of the search index could potentially result even a 10x performance improvement during reindexing operations, such as when a user refreshes the page. The serialized index could be stored locally using localStorage or as a file on the server side for persistence.

There's a notable parallel here with how pandas can swiftly load Parquet files, which, despite containing the same data as CSV files, are loaded significantly faster due to their optimized format. I'm curious to see how much of a performance gain we could achieve in this context with JavaScript.

I'd be interested to hear if this aligns with your thoughts or if there's anything you might want to add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants