Skip to content

🎧 Your Personal Streaming Service

fix: allow searches with 2 chars. closes #65

Deluan5a95feeedc22
diff --git a/persistence/sql_search.go b/persistence/sql_search.go
index 2f745764d..34404a152 100644
--- a/persistence/sql_search.go
+++ b/persistence/sql_search.go
@@ -33,7 +33,7 @@ func (r sqlRepository) index(id string, text string) error {
func (r sqlRepository) doSearch(q string, offset, size int, results interface{}, orderBys ...string) error {
q = strings.TrimSpace(sanitize.Accents(strings.ToLower(strings.TrimSuffix(q, "*"))))
- if len(q) <= 2 {
+ if len(q) < 2 {
return nil
}
sq := Select("*").From(r.tableName)