Unified Storage: Fix search case sensitivity (#99603)

lowercase search query when doing a text query. Doing this makes the NewWildcardQuery be case-insensitive
This commit is contained in:
owensmallwood
2025-01-27 14:39:36 -06:00
committed by GitHub
parent 078ce6a289
commit fd85ddf647

View File

@ -575,7 +575,7 @@ func (b *bleveIndex) toBleveSearchRequest(ctx context.Context, req *resource.Res
if req.Query != "" && req.Query != "*" {
searchrequest.Fields = append(searchrequest.Fields, resource.SEARCH_FIELD_SCORE)
// mimic the behavior of the sql search
query := req.Query
query := strings.ToLower(req.Query)
if !strings.Contains(query, "*") {
query = "*" + query + "*"
}