diff --git a/packages/backend/src/db/meilisearch.ts b/packages/backend/src/db/meilisearch.ts index 320f4d5f6..68404c5b1 100644 --- a/packages/backend/src/db/meilisearch.ts +++ b/packages/backend/src/db/meilisearch.ts @@ -226,6 +226,10 @@ export default hasConfig return null; } else if (term.startsWith("domain:")) { const domain = term.slice(7); + if (domain.length === 0 || domain === "local" || domain === config.hostname) { + constructedFilters.push("userHost NOT EXISTS"); + return null; + } constructedFilters.push(`userHost = ${domain}`); return null; } else if (term.startsWith("after:")) {