mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-21 22:27:08 +00:00
Filter_removed_comments_from_search (#4634)
* filter_removed_comments_from_search * Revert "filter_removed_comments_from_search" This reverts commitc6d6490afa
. * filtering_removed_comments_search * filter_deleted_comments * Revert "filter_deleted_comments" This reverts commit7dc1d13d24
. * Revert "filtering_removed_comments_search" This reverts commit6e9b1de7a2
. * filtering_removed_dELeted_comments_search
This commit is contained in:
parent
c31a29ec7f
commit
0eaf8d33e7
|
@ -215,9 +215,14 @@ fn queries<'a>() -> Queries<
|
|||
if let Some(parent_path) = options.parent_path.as_ref() {
|
||||
query = query.filter(comment::path.contained_by(parent_path));
|
||||
};
|
||||
|
||||
//filtering out removed and deleted comments from search
|
||||
if let Some(search_term) = options.search_term {
|
||||
query = query.filter(comment::content.ilike(fuzzy_search(&search_term)));
|
||||
query = query.filter(
|
||||
comment::content
|
||||
.ilike(fuzzy_search(&search_term))
|
||||
.and(comment::removed.eq(false))
|
||||
.and(comment::deleted.eq(false)),
|
||||
);
|
||||
};
|
||||
|
||||
if let Some(community_id) = options.community_id {
|
||||
|
|
Loading…
Reference in a new issue