Filter_removed_comments_from_search (#4634)
* filter_removed_comments_from_search * Revert "filter_removed_comments_from_search" This reverts commit c6d6490afa923a666b96c785a776711ef42baed7. * filtering_removed_comments_search * filter_deleted_comments * Revert "filter_deleted_comments" This reverts commit 7dc1d13d24f0300ae17cecdf13abbfba24ac9a06. * Revert "filtering_removed_comments_search" This reverts commit 6e9b1de7a21a03caed3b2832fbf5d09c204b7994. * filtering_removed_dELeted_comments_search
This commit is contained in:
parent
c31a29ec7f
commit
0eaf8d33e7
1 changed files with 7 additions and 2 deletions
|
@ -215,9 +215,14 @@ fn queries<'a>() -> Queries<
|
||||||
if let Some(parent_path) = options.parent_path.as_ref() {
|
if let Some(parent_path) = options.parent_path.as_ref() {
|
||||||
query = query.filter(comment::path.contained_by(parent_path));
|
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 {
|
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 {
|
if let Some(community_id) = options.community_id {
|
||||||
|
|
Loading…
Reference in a new issue