Skip to content

Add possible search implementation#62

Open
CoderMuffin wants to merge 6 commits intoSRCF:masterfrom
CoderMuffin:add-search
Open

Add possible search implementation#62
CoderMuffin wants to merge 6 commits intoSRCF:masterfrom
CoderMuffin:add-search

Conversation

@CoderMuffin
Copy link
Copy Markdown

Add a possible implementation for searching.

Potential issues:

  • Can't reorder search terms - they must appear in the same order as the document
  • Search may be a little too permissive in some cases (allows partial matches of 3+ characters in the middle of words)
  • Search performance is a little slow for long queries

this aligns it to be in a similar position to the one on home page, hopefully preventing "where's the search bar gone"
@CoderMuffin CoderMuffin force-pushed the add-search branch 2 times, most recently from 07f6f49 to daec9ec Compare March 29, 2026 12:36
Copy link
Copy Markdown
Member

@rsa33 rsa33 left a comment

Choose a reason for hiding this comment

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

Ok, this builds and seems to work -- the matching is a little funky (e.g. typing an extra character sometimes produces more results rather than narrowing) but generally surfaces useful pages, which I think is a huge improvement over a lack of search.

The latency on long queries is a bit rough though. Whilst I'd expect most people not to write too much here, pasting errors and the like may make it noticeable. A quick look around online led me to flexsearch and its benchmark page which suggests fuse might be one of the slowest libraries. 😅 Is it worth trying a different one?

boost: 1
},
{
field: "heading-title-tolerant",
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

might be able to remove these? can't seem to get a meaningful difference in results with/without them - I think suggest: true might cover the same case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants