mirror of
https://github.com/stalwartlabs/stalwart.git
synced 2026-03-17 14:34:03 +00:00
Search: Fix filters not applied when a single message is in the account
This commit is contained in:
@@ -20,15 +20,9 @@ use std::cmp::Ordering;
|
||||
impl SearchStore {
|
||||
pub async fn query_account(&self, query: SearchQuery) -> trc::Result<Vec<u32>> {
|
||||
// Pre-filter by mask
|
||||
match query.mask.len().cmp(&1) {
|
||||
Ordering::Equal => {
|
||||
return Ok(vec![query.mask.min().unwrap()]);
|
||||
}
|
||||
Ordering::Less => {
|
||||
if query.mask.is_empty() {
|
||||
return Ok(vec![]);
|
||||
}
|
||||
Ordering::Greater => {}
|
||||
}
|
||||
|
||||
// If the store does not support FTS, use the internal FTS store
|
||||
if let Some(store) = self.internal_fts() {
|
||||
|
||||
Reference in New Issue
Block a user