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

Fix loading serialized index from sessionStorage #1579

Merged
merged 1 commit into from Jun 16, 2022

Conversation

timothyvanderaerden
Copy link
Contributor

I noticed that lunr throws an error when it tries to load the serialized index from the sessionStorage. This causes the index to be generated upon each new search entry, which can have a performance impact for large projects.

Lunr throws the error because elixirTokenSplitter added to the pipeline during the index creation but it isn't registered when the index is loaded from the sessionStorage.

The following error is thrown when searching:

Failed to load index:  Error: Cannot load unregistered function: elixirTokenSplitter

@josevalim josevalim merged commit 7f3b649 into elixir-lang:main Jun 16, 2022
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@timothyvanderaerden timothyvanderaerden deleted the lunr-load-index branch June 16, 2022 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants