Skip to content
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

Search bar for posts #45

Open
dag7dev opened this issue Nov 5, 2024 · 7 comments
Open

Search bar for posts #45

dag7dev opened this issue Nov 5, 2024 · 7 comments

Comments

@dag7dev
Copy link

dag7dev commented Nov 5, 2024

It would be nice to have a static search bar that doesn't involve an external service to search for text in our articles.

@tomfran
Copy link
Owner

tomfran commented Nov 5, 2024

Yes I agree, I briefly looked at some libraries but all of them had custom UI which didn't fit. What do you mean by not using external dependencies?

@tomfran
Copy link
Owner

tomfran commented Nov 5, 2024

Implementing some basic search by myself (using basic tokenization and keeping an inverted index loaded in memory) was an option but decided to put that aside for the moment. Maybe you have something in mind that I don't know.

@dag7dev
Copy link
Author

dag7dev commented Nov 5, 2024

Yep, I was exactly thinking about tokenization. By "no external services", I mean avoid using ElasticSearch or services like that.

@dag7dev
Copy link
Author

dag7dev commented Nov 5, 2024

I was thinking about lunr.js, is it feasible for our scopes?

@tomfran
Copy link
Owner

tomfran commented Nov 5, 2024

Oh okay, so an external dependency. I think anything would be okay honestly, given that it provides full text search over pages. The main concern would be about the UI.

Ideally, an implementation that allows to manually display search results would be perfect, this way the UI can be tailored to the theme.

@dag7dev
Copy link
Author

dag7dev commented Nov 5, 2024

Could be interesting to have a separate "search" page?

@tomfran
Copy link
Owner

tomfran commented Nov 5, 2024

Yes we can do that

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

2 participants