pg_searchable 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f553a86615e8566e48c2c9bd8e8eb13d77f89c7
4
- data.tar.gz: 4add369c55d6351311b69e31b44f03d613298b4c
3
+ metadata.gz: 0fe36d62dc0f056525df4bb9840bcf53ee1c9ba7
4
+ data.tar.gz: 0e8ddd178169dd51a0993ec499bc240cb02838a8
5
5
  SHA512:
6
- metadata.gz: eb5c14e5a1f3b7a8282d38a0b982759163881f36b70098049c347e203d398684c7b9a685794fee5b9ffe6acc0a3a8ba617c541921660a00b770706c0deaa622a
7
- data.tar.gz: 16b7aa8e9cfce373a61dd2c4f7bee3620519f5fa2247a810461c7a4c4007a91cf668b7bc02764f3a477dddf91b3f3b48e19fde3303bb3d9578d960f715bfc9f6
6
+ metadata.gz: 518aebd78e48dcc83f6eb6e254f73981cad4110a327071cf9a779a048cd597e089bdb5873348cc75d36cdddd54a7fa05b242b9412280c05f2c049e882b40c53c
7
+ data.tar.gz: ec8599655a5b0faa43af20ea8d2605f992353204d017cee764132db906d45c4ca0ce6e7b1c288b8fa1e212d8407dcf2cc0da8b23f2a289a184931e7bb903545f
@@ -23,10 +23,10 @@ module PgSearchable
23
23
  orders << "(coalesce(similarity(#{klass.arel_table.name}.#{name}, '#{term}'), 0) / 4)"
24
24
  end
25
25
 
26
- Array(config[:dmetaphone][:columns]).each do |name|
27
- conditions << klass.arel_table[name].dmetaphone(term, config[:dmetaphone][:dictionary]).to_sql
28
- orders << "(ts_rank_cd(ARRAY[#{config[:dmetaphone][:weights][0]}, #{config[:dmetaphone][:weights][1]}, #{config[:dmetaphone][:weights][2]}, #{config[:dmetaphone][:weights][3]}], #{arel_table.name}.#{name}, to_tsquery('#{config[:dmetaphone][:dictionary]}', pg_searchable_dmetaphone('#{term}')), #{config[:dmetaphone][:normalization]}) / 2)"
29
- end
26
+ # Array(config[:dmetaphone][:columns]).each do |name|
27
+ # conditions << klass.arel_table[name].dmetaphone(term, config[:dmetaphone][:dictionary]).to_sql
28
+ # orders << "(ts_rank_cd(ARRAY[#{config[:dmetaphone][:weights][0]}, #{config[:dmetaphone][:weights][1]}, #{config[:dmetaphone][:weights][2]}, #{config[:dmetaphone][:weights][3]}], #{arel_table.name}.#{name}, to_tsquery('#{config[:dmetaphone][:dictionary]}', pg_searchable_dmetaphone('#{term}')), #{config[:dmetaphone][:normalization]}) / 2)"
29
+ # end
30
30
  end
31
31
 
32
32
  where("#{conditions.join(' OR ')}")#.order("#{orders.join(' + ')} DESC")
@@ -1,3 +1,3 @@
1
1
  module PgSearchable
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_searchable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen St. Martin