nextapps-de/flexsearch ? reverse-engineered prompt

Reverse engineered prompt

Build me a fast full text search library that works in both the browser and Node.js.

I want it to index text and let me search really quickly, including partial matches, fuzzy searching, suggestions, multi field document search, and result highlighting. It should handle different languages well enough for Latin plus common non Latin scripts like Chinese, Japanese, Korean, Arabic, Cyrillic, Greek, Hebrew, and Hindi.

Please make it usable in simple JavaScript, with examples for both browser and Node, and include a small autocomplete demo so I can see it working. If it makes sense, support running updates and searches in workers so bigger datasets stay responsive. Also add a way to persist the index so it can be stored and loaded again later.

Keep the API easy to use, add a few tests, and make sure the library feels polished and fast. Look up current docs online if you need to.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab