Project

General

Profile

Actions

Defect #19273

closed

acts_as_searchable.rb only seems to be case insensitive if postgresql

Added by Marc Tardif over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Search engine
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

In acts_as_searchable.rb, I see the following code:

          def search_token_match_statement(column, value='?')
            if Redmine::Database.postgresql?
              if Redmine::Database.postgresql_unaccent?
                "unaccent(#{column}) ILIKE unaccent(#{value})" 
              else
                "#{column} ILIKE #{value}" 
              end
            else
              "#{column} LIKE #{value}" 
            end
          end

It seems that the last else statement should read something like "LOWER(#{column}) LIKE #{value.lowercase}". I believe that's what Redmine pre-3 did.


Related issues

Related to Redmine - Defect #20042: A test fail when running it with PostgreSQLClosedGo MAEDA

Actions
Actions

Also available in: Atom PDF