-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
MiniSearch: duplicate ID
error when restarting the dev server (Duplicate for #4251)
#4688
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
Comments
Feel free to recreate that PR. It got closed because the original author deleted their account.
Can you share the case where this happens? I think it shouldn't be needed for markdown changes. In original issue, they were using vite's server.restart inside custom plugin that was causing the issue. |
Basically, if I do a lot of small changes in a markdown segment, like rewriting/rewording, and want to preview how it looks when searching for the segment, the Having the server reload automatically on these changes allows to rebuild the search cache and display fresh changes in the search details. It's not a big change, this is the whole code from the PR: if (index.has(id)) {
index.discard(id)
} I know this is a very minor issue and more of a nitpick, but sometimes I need to test if it's intuitive enough for my users to find a section by keywords, without having to manually restart Unless there is a better way of course, thanks! |
I've to do some refactors for the search plugin. I'll fix this there itself. The search index should be partially rebuilt on md changes. For now, I'd say bear with the issue for some more time. Also, you don't need to manually re-run docs:dev, you can just press r in terminal. |
Describe the bug
Hi,
Opening a duplicate issue here as the original one is locked.
Are there any plans for issue #4251? It got automatically closed by the bot but is still an annoying problem.
While the PR in that issue won't handle replacing headers because their anchor
id
would change, it is still helpful not having to reload the server manually each time after incremental markdown changes when testing the search functionality.Thanks!
Reproduction
N/A
Expected behavior
N/A
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: