Sha256: a85c9c4fe7890eb7e386bbb55c6db407aa6bdcca2c6c256abd54534412ae3cff
Contents?: true
Size: 370 Bytes
Versions: 3
Compression:
Stored size: 370 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.7 | lib/pg_search/features/trigram.rb |
pg_search-0.5.6 | lib/pg_search/features/trigram.rb |
pg_search-0.5.5 | lib/pg_search/features/trigram.rb |