Automattic / Automattic/simplenote-electron

[Feature Request] Improve search algorithm to display results with closest match

Open
#3,099 0 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
TypeScript
Stars
5.3k
Forks
588
Avg merge
9h 45m
Merged PRs (30d)
4

Description

### What

Requested in 5318888-zd-woothemes.

> Could the develops please make it so the search favors the
order of the words you type into the search box - even more so if they
appear in the title?

### Why

> For example, if I search for song lyrics and type "when will", the
search currently puts other notes at the top of the results list. Some
notes I search for are buried way down the results list (not visible) so
I have to type more and more words to bring them near the top of the
list.

There's a screenshot attached to the ticket. Not sharing the screenshot here because it may contain private notes.

### How

> So, could it be made so that a match of an exact string of words will
cause any exact matches to appear at the top of the search results?

Contributor guide

Open the contributing guide

Research direction

The issue names no implementation files or tests; start by locating the search algorithm and its result-ranking entry point in the TypeScript application. Reproduce the example query “when will” and compare the current ordering with the requested behavior, then add coverage showing exact word-order and title matches rank above less-relevant notes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.