[Feature request] Add a way to act on warning "X has changed before removal"
See original GitHub issueContext: I’m using Minisearch to build a search plugin for the note-taking app Obisidian. To make it as fast as possible, I’m reloading Minisearch from cached data when the application boots up.
Since bugs happen, the cached index and cached files can become desynced, and the message MiniSearch: document with ID xyz has changed before removal
appears. Unfortunately, we can’t act on this, the errors pile up, and eventually the search index becomes unusable or corrupted.
I think a new callback field on the Options
object would be a simple and efficient solution. It could be called when the console.warn
is shown, so library users could manage it effectively.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Add logger option to specify a custom logger by lucaong · Pull ...
Successfully merging this pull request may close these issues. [Feature request] Add a way to act on warning "X has changed before removal"....
Read more >Safely open apps on your Mac - Apple Support
Go to Security & Privacy. Click the Open Anyway button in the General pane to confirm your intent to open or install the...
Read more >Strict Mode - React
When strict mode is enabled, React compiles a list of all class components using the unsafe lifecycles, and logs a warning message with...
Read more >Feature request response email templates - LiveAgent
If a customer is inquiring about a feature that has been removed, provide an honest explanation of why it has been done to...
Read more >Unexplained Windows or software behavior may be caused ...
Click Programs, and then click Programs and Features. In the Uninstall or change a program list, find programs that you do not recognize...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
oh my, that’s awesome. Thank you for this!
Throwing an error makes sense but - for my use-case - I’d rather just warn the user, set a flag somewhere, and trigger a reindex for later (i.e. at next boot). When the first warning pops up, it’s usually relatively benign and affects a small subset of documents. I’d rather not kill the search engine outright while it is being used, and impose a (sometimes long) reindex when it is still 99% good.