```ruby
module Sequel
  module Plugins
    module PgTrgm
      module DatasetMethods
        def text_search(column, query)
          where("? % ?", column, query).reverse_order{ similarity(column, query) }
        end
      end
    end
  end
end
```

Replace implicit SQL literal in filter method.
user
```ruby
module Sequel
  module Plugins
    module PgTrgm
      module DatasetMethods
        def text_search(column, query)
          where(Sequel.lit('? % ?', column, query)).reverse_order{ similarity(column, query) }
        end
      end
    end
  end
end
```
assistant