fedwiki / wiki-server

Federated Wiki client and server in Node.js
Other
153 stars 35 forks source link

Fixing corrupted site-index #174

Closed paul90 closed 1 year ago

paul90 commented 1 year ago

This, together with fedwiki/wiki-client#300, fix a problem with the site-index getting corrupted. Caused by not providing the correct original text when removing an old version of a page from the index while forking that page.

MiniSearch v6, adds the ability to remove (discard) a page from the index without needing the original text.

This PR makes use of MiniSearch discard() and replace(), removing the need to have the original indexed text to be able to remove, and then re-add, pages from the index.

An issue with removing HTML tags while extracting the text from the page has also been fixed.