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

Better way to search wiki #170

Open
NotUnlikeTheWaves opened this issue Jun 3, 2020 · 4 comments
Open

Better way to search wiki #170

NotUnlikeTheWaves opened this issue Jun 3, 2020 · 4 comments

Comments

@NotUnlikeTheWaves
Copy link
Collaborator

Currently wiki pages are searched for in two hardcoded folders: /wiki/docs/scripting/callbacks and /wiki/docs/scripting/functions.

With the wiki pages also getting sections for resources and tutorials on top of functions/callbacks (and who knows what more) I suggest making the search implementation more generic. My suggestion is to search for any file named like the entered query in /docs or any subfolder. Ideas?

@Southclaws
Copy link
Owner

This would make sense. I've wanted to try out Bleve for something like this for a while: https://blevesearch.com/

@NotUnlikeTheWaves
Copy link
Collaborator Author

Does bleve make sense for this application? A quick scan around their functionality seems that it returns multiple results as a closest match. Could this favor a page mentioning X over page X itself?

I think this could be a discussion too: what's the desired behavior of the wiki command? is searching pages for content a good functionality instead of matching the title? What's a good use case for it?

I might be misinterpreting how you suggest bleve can be used here, so feel free to point it out

@Southclaws
Copy link
Owner

Yes it's a search tool. I probably wouldn't suggest full-text content searching though, that's a bit of a bad match for Discord as a UI for this.

Though an actual search could be useful in some contexts. I've had a few cases where a user has asked about a broad topic and I post a bunch of APIs for that topic. Being able to /wiki vehicle and get all the vehicle functions could be beneficial.

Though this would be better done through tagging inside the wiki content itself. I believe Docusaurus supports some form of categorisation or tagging.

It might also be worth just doing a levenshtein distance on the filename.

@NotUnlikeTheWaves
Copy link
Collaborator Author

Worth pointing out that currently there already is a Levenshtein distance check on what it currently returns

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