mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Don't search for community descriptions, search for user display_name. (#2430)
- https://github.com/LemmyNet/lemmy-ui/issues/756
This commit is contained in:
parent
265dc54627
commit
3f2a689edf
@ -140,8 +140,7 @@ impl<'a> CommunityQuery<'a> {
|
||||
let searcher = fuzzy_search(&search_term);
|
||||
query = query
|
||||
.filter(community::name.ilike(searcher.to_owned()))
|
||||
.or_filter(community::title.ilike(searcher.to_owned()))
|
||||
.or_filter(community::description.ilike(searcher));
|
||||
.or_filter(community::title.ilike(searcher));
|
||||
};
|
||||
|
||||
match self.sort.unwrap_or(SortType::Hot) {
|
||||
|
@ -70,7 +70,10 @@ impl<'a> PersonQuery<'a> {
|
||||
.into_boxed();
|
||||
|
||||
if let Some(search_term) = self.search_term {
|
||||
query = query.filter(person::name.ilike(fuzzy_search(&search_term)));
|
||||
let searcher = fuzzy_search(&search_term);
|
||||
query = query
|
||||
.filter(person::name.ilike(searcher.to_owned()))
|
||||
.or_filter(person::display_name.ilike(searcher));
|
||||
}
|
||||
|
||||
query = match self.sort.unwrap_or(SortType::Hot) {
|
||||
|
Loading…
Reference in New Issue
Block a user