error-message-index icon indicating copy to clipboard operation
error-message-index copied to clipboard

Full-text search

Open srid opened this issue 3 years ago • 4 comments

For example, when I type Character literals may not be empty in the search box, I'd expect to see GHC-11861, but currently, it returns 0 results presumably because only the title is searched.

cf. https://stork-search.net/ | https://github.com/EmaApps/emanote/pull/327

srid avatar Oct 20 '22 17:10 srid

I agree that this would be nice! Stork-search looks really great.

I'm a bit reluctant to add a build-time dependency on the whole Rust toolchain for this site, though. I think it's important to keep things low-tech and very easy to maintain, both to make contributions by new users easier and to help me be efficient with my time use. If the instructions include "download this whole other compiler and language" or "install nix" or "use guix", then I think the barriers become too high.

Do you have any thoughts on how to reduce the maintenance and build-time implications of something like that?

david-christiansen avatar Oct 20 '22 18:10 david-christiansen

You are right. Doing something like this without Nix can be quite complex.

Alternatively, you could parse the Markdown using pandoc and extract just the GHC error message, storing them as JSON that is then used by the JavaScript code.

But if search engines can index this site well enough such that it appears when people search for the specific error message, we probably wouldn't even need this feature.

srid avatar Oct 20 '22 19:10 srid

My hope is that Google and friends will do a good job indexing the site.

david-christiansen avatar Oct 20 '22 19:10 david-christiansen

On further reflection, I think that a setup where there was full-text search only of the GHC message, and not the documentation and explanations as well, could be quite confusing and unexpected.

david-christiansen avatar Oct 20 '22 19:10 david-christiansen