From 9c1f6fc7d3df6cf166c7f110262c65ed1511e7ec Mon Sep 17 00:00:00 2001 From: Adrian Gruntkowski Date: Mon, 30 Oct 2023 14:52:08 +0100 Subject: [PATCH] Start searching from a singly character in domain field --- lib/plausible/sites.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plausible/sites.ex b/lib/plausible/sites.ex index edcc2ae25..e8eb72490 100644 --- a/lib/plausible/sites.ex +++ b/lib/plausible/sites.ex @@ -86,7 +86,7 @@ defmodule Plausible.Sites do end defp maybe_filter_by_domain(query, domain) - when byte_size(domain) >= 3 and byte_size(domain) <= 64 do + when byte_size(domain) >= 1 and byte_size(domain) <= 64 do where(query, [s], ilike(s.domain, ^"%#{domain}%")) end