emersonbottero / vitepress-plugin-search

Provide local search to your documentation site.
MIT License
238 stars 30 forks source link

Is it possible to support lazy loading of index data? #70

Open CyanSalt opened 1 year ago

CyanSalt commented 1 year ago

In my site, the search function makes no sense for a part of users, but adding this plugin causes all users to load the index data. Especially in the CJK lang, the index data may be very huge.

Is it possible to provide an option to support loading index data when searching is first executed?

emersonbottero commented 1 year ago

It may be.. But them the first search would be slower than the rest... But seems like a good idea if I provide an message or loading indicator...

If you use forward in the tokenizer the size should be smaller