Page MenuHomeMusing Studio

Support searching blog posts
Open, WishlistPublic

Description

Overview

Add a search button or search box to blogs. Most likely, make it optional.

Also tracked publicly.

Users

Bruno de Souza said:

Do you have a prevision when will make a search button, or a list with all the tags of the blog?
I’m thinking when I have 10000 posts. How will I search a specific tag? I know that there is #hashtag, but will be interesting if have a search button, or a space that show all the tags.

This is also required by Ploum and requested by Gina, aris, and bugbuster.

Event Timeline

matt triaged this task as Wishlist priority.Jun 4 2018, 4:06 PM
matt created this task.
matt added projects: WriteFreely, Restricted Project.
matt removed matt as the assignee of this task.Aug 13 2019, 3:23 PM
matt changed the visibility from "Restricted Project (Project)" to "Public (No Login Required)".
matt changed the edit policy from "Restricted Project (Project)" to "All Users".
matt updated the task description. (Show Details)

I've been thinking about implementation details for this.

We might need to parse the post body as just text, I imagine a scenario where someone searches for a word that is also an html element. They might get back results that 'match' but the document would contain no reference to the word.

I think we would do best with 3 queries for any given search, exact match on title should be at the top of results. Followed by partial title or exact match in body copy.

The final query could be any of the terms, after being split up and junk ('of', 'a', 'the', etc) removed, found in either title or body on a given post. with the number of matches returned as a score of sorts, to allow sorting the results.

We could cache these results for a short time, 5 min? to prevent extra work on the backend while looking through pages of results. Possibly have some cache invalidation when the query is resubmitted with the search form/box. Maybe this cache could be browser side?