Instant Search Improvements
theoryshaw opened this issue · comments
Love the search function, but would be awesome if you could sort by date too.
I would like this too (as well as being about to take advantage of Algolia's faceted searches) and text, date, title, and h1/title tags are currently indexed.
The current implementation is super basic. But I need to bump up to the latest version of Instant Search for general performance improvements.
I would love help on this because I don't know when I'll ever get around to it.
Main bits of the Algolia implementation are in the default template:
Line 30 in aa9bf78
And in the Algolia js in the footer: https://github.com/mkiser/WTFJHT/blob/master/_includes/algolia.html
Read-only API key is available in the config.yml file, so anybody that wants to try this out has everything they need
Ever use https://www.bountysource.com/?
Might be a good way to run a mini funding campaign to fund the development of this functionality.
I've used it before, it's a pretty neat approach.
INSTANT SEARCH REQUIREMENTS
WTF is a blog built on Jekyll using Algolia for its search engine. We need to migrate to Algolia's Instant Search toolkit: https://community.algolia.com/jekyll-algolia/blog.html
User Stories
- As a reader, I want the WTFJHT Algolia Instant Search integration to be a powerful discovery tool and resource for exploring the history of the Trump administration
- As a reader, I want to be able to search for all records related to a person, place, or thing. By default, the results should be limited to the first 10 results, but allow the user to "show more"
- As a reader, I want to be able to use common synonyms for searching (e.g.
Russia
matchesMoscow
,Kremlin
) - As a reader, I want to be able to filter search results by preset date ranges (e.g. "All Time"; "Past Week"; "Past Month"; "Past Year"; "Custom Range")
- As a reader, I want to be able to use
and|or
operators - As a reader, I want to be able to share SEO friendly URLs from my search parameters
WTF Reqs
- Index only files in the
_posts
directory - Index body contents, title, description, and date
- Default sort by best match first, then date
- Update once per day as a separate Travis CI process. Currently, the index is updated on every build, which is wasteful. Proposal: Update the index on first deploy per day (checking against the previous post's date)