X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/fb53f95a1069ecda58f809ff237633440601bd32..0f537bcaa60b8a1496010bc9d4a943484e69081c:/services/api/lib/record_filters.rb diff --git a/services/api/lib/record_filters.rb b/services/api/lib/record_filters.rb index 982a9c30b6..c8f024291c 100644 --- a/services/api/lib/record_filters.rb +++ b/services/api/lib/record_filters.rb @@ -44,9 +44,9 @@ module RecordFilters cond_out = [] - if attrs_in == 'any' && operator.casecmp('ilike') && (operand.is_a? String) && operand.match('^[%].*[%]$') + if attrs_in == 'any' && (operator.casecmp('ilike').zero? || operator.casecmp('like').zero?) && (operand.is_a? String) && operand.match('^[%].*[%]$') # Trigram index search - cond_out << model_class.full_text_trgm + " ilike ?" + cond_out << model_class.full_text_trgm + " #{operator} ?" param_out << operand # Skip the generic per-column operator loop below attrs = []