class PgSearch::Features::Trigram

def conditions

def conditions
  ["(#{@normalizer.add_normalization(document)}) % #{@normalizer.add_normalization(":query")}", {:query => @query}]
end

def document

def document
  @columns.map { |column| column.to_sql }.join(" || ' ' || ")
end

def initialize(query, options, columns, model, normalizer)

def initialize(query, options, columns, model, normalizer)
  @query = query
  @options = options
  @columns = columns
  @model = model
  @normalizer = normalizer
end

def rank

def rank
  ["similarity((#{@normalizer.add_normalization(document)}), #{@normalizer.add_normalization(":query")})", {:query => @query}]
end