diff --git a/app/controllers/universal_tables_controller.rb b/app/controllers/universal_tables_controller.rb index 11e44ff..beb411b 100644 --- a/app/controllers/universal_tables_controller.rb +++ b/app/controllers/universal_tables_controller.rb @@ -258,12 +258,13 @@ class UniversalTablesController < ApplicationController q.each do |k, v| column = table.table_columns.where(:key => k).first next if column.nil? - if column.make_categorizable - regex = Regexp.new(".*"+v+".*", "i") - else - regexes = v.split(/\s+(?=(?:[^"]*"[^"]*")*[^"]*$)/) - regex = Regexp.union(regexes.map{|word| Regexp.new(".*"+word+".*", "i")}) - end + # if column.make_categorizable + # regex = Regexp.new(".*"+v+".*", "i") + # else + # regexes = v.split(/\s+(?=(?:[^"]*"[^"]*")*[^"]*$)/) + # regex = Regexp.union(regexes.map{|word| Regexp.new(".*"+word+".*", "i")}) + # end + regex = Regexp.new(".*"+v+".*", "i") if column.type == "text" columns = column.column_entries.any_of([{"text.en" => regex}, {"text.zh_tw" => regex}]) elsif column.type == "editor"