From b8f40dde1e910b282f2b249b96fa88f4bb7e8a64 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 29 Oct 2025 17:18:56 +0100 Subject: [PATCH] feat: do also text match (#6891) Signed-off-by: Ettore Di Giacinto --- core/gallery/gallery.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/gallery/gallery.go b/core/gallery/gallery.go index 82160ece0..d8dc3100f 100644 --- a/core/gallery/gallery.go +++ b/core/gallery/gallery.go @@ -61,12 +61,15 @@ func (gm GalleryElements[T]) Search(term string) GalleryElements[T] { term = strings.ToLower(term) for _, m := range gm { if fuzzy.Match(term, strings.ToLower(m.GetName())) || - fuzzy.Match(term, strings.ToLower(m.GetDescription())) || fuzzy.Match(term, strings.ToLower(m.GetGallery().Name)) || + strings.Contains(strings.ToLower(m.GetName()), term) || + strings.Contains(strings.ToLower(m.GetDescription()), term) || + strings.Contains(strings.ToLower(m.GetGallery().Name), term) || strings.Contains(strings.ToLower(strings.Join(m.GetTags(), ",")), term) { filteredModels = append(filteredModels, m) } } + return filteredModels }