Merge pull request #1189 from LemmyNet/fix_search_filter

Fixing post community filter. Fixes #1187
This commit is contained in:
Nutomic 2020-10-12 10:31:15 +00:00 committed by GitHub
commit f44612970a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -289,9 +289,7 @@ impl<'a> PostQueryBuilder<'a> {
if let Some(search_term) = self.search_term {
let searcher = fuzzy_search(&search_term);
query = query
.filter(name.ilike(searcher.to_owned()))
.or_filter(body.ilike(searcher));
query = query.filter(name.ilike(searcher.to_owned()).or(body.ilike(searcher)));
}
query = match self.sort {