Sha256: 4b2190b45a8646b5e300050d9450fa9cf8f9a00567cda4caba7712aed1478186
Contents?: true
Size: 372 Bytes
Versions: 3
Compression:
Stored size: 372 Bytes
Contents
module PgSearch module Features class Trigram < Feature def conditions [ "(#{normalize(document)}) % #{normalize(":query")}", {:query => @query} ] end def rank [ "similarity((#{normalize(document)}), #{normalize(":query")})", {:query => @query} ] end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pg_search-0.5.4 | lib/pg_search/features/trigram.rb |
pg_search-0.5.3 | lib/pg_search/features/trigram.rb |
pg_search-0.5.2 | lib/pg_search/features/trigram.rb |