Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Add substring matching to list search like campaign search. Closes #2896.

Kailash Nadh8d1b9fdb2ea7
diff --git a/queries/lists.sql b/queries/lists.sql
index 673b1c67..93d5fafc 100644
--- a/queries/lists.sql
+++ b/queries/lists.sql
@@ -14,7 +14,7 @@ WITH ls AS (
CASE
WHEN $1 > 0 THEN id = $1
WHEN $2 != '' THEN uuid = $2::UUID
- WHEN $3 != '' THEN to_tsvector(name) @@ to_tsquery ($3)
+ WHEN $3 != '' THEN (TO_TSVECTOR(name) @@ TO_TSQUERY ($3) OR name ILIKE $3)
ELSE TRUE
END
AND ($4 = '' OR type = $4::list_type)