Stream: IG creation
Topic: Alternative IG search engine
Jose Costa Teixeira (May 10 2021 at 15:08):
Hi. In the past I experimented with a built-in search engine in the IGs. This would allow offline searching and not rely on Google (which has its downsides because we woudn't be feeding the algorithm that often).
The idea would be to have a search box in every IG page and when we search, we'd have a results page like this:
image.png
Jose Costa Teixeira (May 10 2021 at 15:09):
Thoughts?
Grahame Grieve (May 10 2021 at 20:10):
seems like super hard work to me. Search is hard to do well
Jose Costa Teixeira (May 11 2021 at 13:02):
ok, so before that:
Jose Costa Teixeira (May 11 2021 at 13:03):
currently we have the searchform that allows us to do a DDG / Google search.
Jose Costa Teixeira (May 11 2021 at 13:04):
I'm thinking that we could toggle that feature on/off. If we have in our template config something like
---
search:
engine: ddg
enabled: true
then the ig authors can choose (if the template allows them to choose of course)
Jose Costa Teixeira (May 11 2021 at 13:08):
which means that in the future someone may implement a engine: internal
option (which I think would be possible with a bit of JS knowledge and a bit of time).
Grahame Grieve (May 12 2021 at 12:35):
maybe, but that part is not done when the IG is generated - it's done by the publication tooling, and the search template deals with that
Jose Costa Teixeira (May 12 2021 at 13:58):
My experiment stumbled upon saving the index to the file system (which is not something you want to do on the build server...)
Max Masnick (May 14 2021 at 09:35):
@Jose Costa Teixeira if you're interested in implementing search with JS, look at https://fusejs.io -- allows you to construct a JSON object, and then do realtime fuzzy searching through it locally in the browser
Last updated: Apr 12 2022 at 19:14 UTC