Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

chore(search): spam trash email cleanup (#1658)

gbirman13b354ff5e43
diff --git a/rust/cloud-storage/opensearch_client/src/search/emails.rs b/rust/cloud-storage/opensearch_client/src/search/emails.rs
index 716348ef1a..90098cb31a 100644
--- a/rust/cloud-storage/opensearch_client/src/search/emails.rs
+++ b/rust/cloud-storage/opensearch_client/src/search/emails.rs
@@ -92,10 +92,6 @@ impl EmailQueryBuilder {
let mut content_bool_query = self.inner.build_content_bool_query()?;
// CUSTOM ATTRIBUTES SECTION
- // We don't want to include trash or spam items in your email search
- content_bool_query.must_not(QueryType::term("labels", "TRASH"));
- content_bool_query.must_not(QueryType::term("labels", "SPAM"));
-
// If link_ids are provided, add them to the query
if !self.link_ids.is_empty() {
content_bool_query.filter(QueryType::terms("link_id", self.link_ids.clone()));
diff --git a/rust/cloud-storage/opensearch_client/src/search/emails/test.rs b/rust/cloud-storage/opensearch_client/src/search/emails/test.rs
index 4dcd0ad4a9..b9edff82c1 100644
--- a/rust/cloud-storage/opensearch_client/src/search/emails/test.rs
+++ b/rust/cloud-storage/opensearch_client/src/search/emails/test.rs
@@ -132,18 +132,6 @@ fn test_build_search_request() -> anyhow::Result<()> {
}
}
],
- "must_not": [
- {
- "term": {
- "labels": "TRASH"
- }
- },
- {
- "term": {
- "labels": "SPAM"
- }
- }
- ]
}
},
});
diff --git a/rust/cloud-storage/opensearch_client/src/search/unified/test.rs b/rust/cloud-storage/opensearch_client/src/search/unified/test.rs
index 0ea50248ba..6b65cce767 100644
--- a/rust/cloud-storage/opensearch_client/src/search/unified/test.rs
+++ b/rust/cloud-storage/opensearch_client/src/search/unified/test.rs
@@ -664,18 +664,6 @@ fn test_build_unified_search_request_content() -> anyhow::Result<()> {
}
}
],
- "must_not": [
- {
- "term": {
- "labels": "TRASH"
- }
- },
- {
- "term": {
- "labels": "SPAM"
- }
- }
- ]
}
},
{