Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search improvement #1034

Merged
merged 5 commits into from Sep 22, 2023
Merged

Search improvement #1034

merged 5 commits into from Sep 22, 2023

Conversation

GBKS
Copy link
Contributor

@GBKS GBKS commented Sep 13, 2023

This is a bigger update to the search functionality on the site.

I updated the LunrJS library, which powers our search. The latest version has some extra features like fuzzy search and term presence. This is now enabled and highlighted to users on the search page via an expandable "Search tips" section. For simple single-term searches, the site uses a slightly fuzzy search. So if you type "bech31", it will also find "bech32". Or if you type "wxllet", it will also find "wallet". Helps with those small typos or easy-to-misspell technical terms.

I removed our SEO placeholder pages from the search index. These are currently causing search results that read "..." on the site. Not pretty. The search page is also removed from search results. Also, the search input field now has a placeholder and I fixed a technical issue with a misspelling.

Search results now also have a small dot next to them to indicate the quality/confidence of the result. Green is a good match, grey is just an OK match. Colors can range in between those two based on the scores.

The search tips are a little hidden, just being visible on the search page. Would be nice to include them somehow in the search modal as well, without cluttering things up.

Probably good to test this thoroughly before finalizing. Would be great if you could help test some searches, especially ones you have previously used and maybe not found good results for.

Some preview links:

Closes #1032

This is a bigger update to the search functionality on the site.

I updated the LunrJS library, which powers our search. The latest version has some extra features like fuzzy search and term presence. This is now enabled and highlighted to users on the search page via an expandable "Search tips" section. For simple single-term searches, the site uses a slightly fuzzy search. So if you type "bech31", it will also find "bech32". Or if you type "wxllet", it will also find "wallet". Helps with those small typos or easy-to-misspell technical terms.

I also removed our SEO placeholder pages from the search index. These are currently causing search results that read "..." on the site. Not pretty. The search page is also removed from search results.

Search results now also have a small dot next to them to indicate the quality/confidence of the result. Green is a good match, grey is just an OK match. Colors can range in between those two based on the scores.

The search tips are a little hidden, just being visible on the search page. Would be nice to include them somehow in the search modal as well, without cluttering things up.

Probably good to test this thoroughly before finalizing.
@GBKS GBKS added Dev Development-focused tasks. Design Task is about designing something. labels Sep 13, 2023
@GBKS GBKS self-assigned this Sep 13, 2023
@netlify
Copy link

netlify bot commented Sep 13, 2023

Deploy Preview for bitcoin-design-site ready!

Name Link
🔨 Latest commit e902af7
🔍 Latest deploy log https://app.netlify.com/sites/bitcoin-design-site/deploys/650c55e8cce8fc00085ec84e
😎 Deploy Preview https://deploy-preview-1034--bitcoin-design-site.netlify.app/guide/contribute/formatting/media
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@GBKS GBKS mentioned this pull request Sep 20, 2023
danielnordh
danielnordh previously approved these changes Sep 20, 2023
Copy link
Contributor

@danielnordh danielnordh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and gives better results.
LGTM

@rabbitholiness
Copy link
Collaborator

I tested the use cases that you mention above. Works as promised 💪.

I really like the search tips. Agree that it could be nice in the modal. On the results page, they are a bit hidden at the bottom of the list. Maybe it's worth trying to place it somewhere underneath the search box.

The dots are a nice indicator if one knows what they represent. Personally, I wouldn't have guessed what they mean.

Not sure this is relevant or anything can/should be done about it, but it seems that with very short search terms I get a lot of unrelated results, where the live site doesn't.
I tried searching for the word "scam". On the live site this yields no results. In the preview I get a lot of results that are not relevant. When I clicked through to some of the found pages, I tried the browser search to see what triggered the results. No three letter combination yielded results (e.g. sca or cam). When I searched for two characters (sc, ca, am,...) I got a lot of results . This is probably due to the fact that it is a very short search term and I'm not sure whether this needs to be addressed, but I just wanted to mention it.

sbddesign
sbddesign previously approved these changes Sep 20, 2023
Copy link
Collaborator

@sbddesign sbddesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔎

@GBKS GBKS dismissed stale reviews from sbddesign and danielnordh via 32b4962 September 21, 2023 06:39
Still a bit hidden, but at least there's a way now to see what the gray or green circle means.
@GBKS
Copy link
Contributor Author

GBKS commented Sep 21, 2023

Thanks for the reviews and feedback. I just fixed the merge conflict and made a small tweak to add a tool tip to the match quality indicator dots (hover one and see "Great match", "Good match" or "OK match").

@rabbitholiness good point about short results. That is a side effect of making simple searches fuzzy. The same logic that brings up find "bech32" when you types "bech31", also creates false positives. This is ideally where the match quality indicator helps you identify what results are worth looking at.

Interesting that you searched for the word scam. Feels like this could be an easter egg term where we show you an appropriate GIF instead of actual results.

Generally, ready for the next round of reviews. Thank you in advance.

Copy link
Collaborator

@sbddesign sbddesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I found a weird bug here:

  1. Click on search
  2. Fill search input with a single word string with no whitespace, e.g. wallet
  3. When the dropdown populates with search results, do NOT hit enter. Instead, click the "See X Results" button.

image

  1. Notice that the search results have a tilde and 1 appended, e.g. wallet~1

image

As far as I can tell, with tilde and without tilde seem to produce the same search results. It just looks kind of tacky.

Copy link
Collaborator

@sbddesign sbddesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤙

@GBKS GBKS merged commit f5739bf into master Sep 22, 2023
4 checks passed
@GBKS GBKS deleted the feature/search-update branch September 22, 2023 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Task is about designing something. Dev Development-focused tasks.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update the site search
4 participants