Skip to content

[Feature Request] FlexSearch based full-text search baked in #2330

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

Open
maximousblk opened this issue Apr 21, 2020 · 0 comments
Open

[Feature Request] FlexSearch based full-text search baked in #2330

maximousblk opened this issue Apr 21, 2020 · 0 comments

Comments

@maximousblk
Copy link

Feature request

A FlexSearch based full-text search would be awesome

What problem does this feature solve?

Confidential documents such as proprietary software documentations can't take the risks to submit all the data to a third party service like algolia. Also header based search doesn't always seem to be of much help. Instead of a remote service, a local search index will be quicker, there is no network overhead, and will remain available and usable even without a network connection.

Past issues about this (#68, #385, #261) are like 2 years old and there seems to be no update on them. Moreover the solution was to create your own theme if you wan't native full-text search. And this issue was overlooked as a plan for version 1 which i think at this point is 1 year old. This is a drawback considering the competition.

What does the proposed API look like?

During build time, the whole documentation is is indexed and and stored statically. Indexing should be done after the building the pages so that vue components and computed content also gets indexed.

run build >build all the pages > index all readable content > JSON output

when the user searches for something, the search function refers to the statically stored index. The index loads when the user first visits the page but after loading all the UI components.

page request > load page > load index

How should this be implemented in your opinion?

In my opinion, we can use the FlexSearch library itself or create a custom variation favorable to documentations.

A lightweight alternative library would be lunr.js

You might wanna look at vuepress-plugin-fulltext-search

Are you willing to work on this yourself?

I'm very new to vue and also new to programming itself. This is based on my first project ever done with vue and vuepress. So, I don't think I can start creating new features for large libraries right-away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant