this post was submitted on 07 Jun 2025
39 points (95.3% liked)

hexbear

10494 readers
1 users here now

Hexbear Meta Community

Posts should be a a Proposal (idea for changing the site), Feedback (regarding non-technical aspects of the site, for technical please use https://hexbear.net/c/feedback), or Appeals (regarding admin/moderator actions).

Discussion regarding these will be within comments under the post, appeals and feedback that is resolve may be removed as well as duplicate posts.

The following behavior will result in mod action:

founded 5 years ago
MODERATORS
 

Whenever I've used the search function, it returns almost nothing relevant to what I'm looking for, and the time constraints don't work. If I look for things using the "top (time)" feature, I always get results outside of the desired time period. Why does this happen, is a fix in progress, and how hard would it be to implement?

you are viewing a single comment's thread
view the rest of the comments
[–] buh@hexbear.net 17 points 7 months ago (1 children)

idk how true this is but I once saw a post saying the search function is basically a database query that replaces spaces with wildcards

[–] FunkyStuff@hexbear.net 14 points 7 months ago (1 children)

Correct

Line 288:

pub fn fuzzy_search(q: &str) -> String {
  let replaced = q
    .replace('\\', "\\\\")
    .replace('%', "\\%")
    .replace('_', "\\_")
    .replace(' ', "%");
  format!("%{replaced}%")
}
[–] Edie@hexbear.net 8 points 7 months ago

You can link directly to a line, or even multiple. Clicking on the line number highlights it, shift+clicking on another highlights all in between the two selected.