Metadata
- Source
- FLUID-5722
- Type
- Bug
- Priority
- Blocker
- Status
- Closed
- Resolution
- Fixed
- Assignee
- Antranig Basman
- Reporter
- Jonathan Hung
- Created
2015-07-28T14:29:27.987-0400 - Updated
2019-07-08T13:29:04.620-0400 - Versions
- N/A
- Fixed Versions
- N/A
- Component
-
- Docs platform
Description
Add search functionality to the documentation platform.
Searching will need to be a client-side solution since there is no database or a server.
Docpad has a search plugin called lunr:
https://github.com/brockfanning/docpad-plugin-lunr
Comments
-
Jonathan Hung commented
2017-03-15T10:40:27.883-0400 Another possible alternative is Tipue, a jQuery based search engine that can work on static sites.
website: http://www.tipue.com/
github: https://github.com/Tipue/Tipue-SearchOpen Source, MIT License.
-
Tony Atkins [RtF] commented
2017-03-15T11:08:33.613-0400 Very interesting. I'd be happier if they had indexing tools, but my reading of their docs and code suggests that it's not much work to create a static index on our own. Here's an example:
https://github.com/Tipue/Tipue-Search/blob/master/demo/static/tipuesearch/tipuesearch_content.js
A single entry looks like:
{"title": "Tipue", "text": "Tipue is a small web development studio based in North London.", "tags": "jQuery HTML5 CSS", "url": "http://www.tipue.com"},
Looking at an example from our docs, it looks like we already have structured data for the title and tags (category). We should be able to guess at the URL based on the FS structure. This leaves the text, which is basically the markdown minus any inline markup. I'd assume we can get something reasonable using something like pandoc.
-
Tony Atkins [RtF] commented
2017-03-15T11:12:11.275-0400 Just to comment a bit further, the other things I'd want to read up on regarding this (or really any solution) would be:
- Support for stemming.
- Support for improving search quality using stopwords.
- Support for multiple languages.
-
Tony Atkins [RtF] commented
2017-03-16T04:51:43.902-0400 I read through the Tipue docs, they have support for stopwords, stemming, and field weighting. However, as they do not include useful data for stopwords and stemming, we'd have to roll our own or adapt someone else's body of data.
As far as I can see, there is absolutely no option to switch between languages, but if you're dealing with a static site that has different subdirectories by language, it's possible to have a different search index and stopwords per language.
Anyway, my overall impression of Tipue is that it seems like it would work, but it doesn't do all that much to help us bridge the gaps.
-
Tony Atkins [RtF] commented
2019-04-17T07:46:03.669-0400 I recently revisited the options for search in a technology evaluation on the WIKI:
https://wiki.gpii.net/w/Technology_Evaluation_-_Static_Site_Search#Recommendation
After getting some small feedback from the group, my plan is to proceed to "spike" a proof-of-concept approach with Fuse.js.
-
Tony Atkins [RtF] commented
2019-04-30T04:58:24.937-0400 -
Cindy Li commented
2019-07-08T13:29:04.613-0400 The pull request has been merged into the project repo master branch at this commit.