mkiser / WTFJHT

Logging the daily shock and awe in national politics. Read in moderation.

Home Page:https://whatthefuckjusthappenedtoday.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

<!-- ALGOLIA -->

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 matches Moscow, 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)