smart_search 0.0.91 → 0.0.96

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b57cb82919d2ca20035a53bc79b48a9e39f173d
4
- data.tar.gz: bbfe700ed2abdfcfcc126ce9378624c5608f8cb5
3
+ metadata.gz: 2eea1ae08ee42a272bb6c46e9be0879bdc998e45
4
+ data.tar.gz: eb172e38f3cfac374fc8f2dc7f42a0cee93ee152
5
5
  SHA512:
6
- metadata.gz: d21748d7e69a23a1a3ae4f51111cf7fbb3213a0259c712aec37e655e9a58ff0060f423997ccfa03a20338d25883eff3663c1fd370b22fe0bc09eb7bc8199ce41
7
- data.tar.gz: ab1731b0fc64b2bcd9d824df4260c993882a1ec7b2c7482c64930f1d876f26ae458d74b31048949ab91e6cb03d8755c379777607ecab7c627ab26558f54e5f19
6
+ metadata.gz: 10d57223b4205896105c73232d15501d2d28f54de3ea6f95f223e444c61d027751ef499b40e03be6ba2eb0587851ed51b0fac509c9fe934b054a123571122969
7
+ data.tar.gz: 6938b923f45869af837e34c333f3105cc8e3da3577373bf4c3942253b085ed73aa1a54899aea64245655a886ca832ebc568b8da5651220ccb60c52fc49310962
data/config/database.yml CHANGED
File without changes
File without changes
data/lib/smart_search.rb CHANGED
@@ -223,7 +223,7 @@ module SmartSearch
223
223
  if !t[:search_tags].blank? && t[:search_tags].size > 1
224
224
  begin
225
225
  SmartSearchTag.create(t.merge!(:table_name => self.class.table_name, :entry_id => self.id, :search_tags => t[:search_tags].strip.split(" ").uniq.join(" ")))
226
- rescue Mysql2::Error => e
226
+ rescue Exception => e
227
227
 
228
228
  end
229
229
  end
File without changes
File without changes
@@ -16,7 +16,7 @@ class SmartSimilarity < ActiveRecord::Base
16
16
 
17
17
  #== Konstanten
18
18
  # Defines the min. result of word simililarity check
19
- SIMILARITY_FACTOR = 0.77
19
+ SIMILARITY_FACTOR = 0.78
20
20
  # Defines first simililarity check method
21
21
  SIMILARITY_METHOD_1 = :jarowinkler
22
22
  # Defines first simililarity check method
@@ -75,7 +75,7 @@ class SmartSimilarity < ActiveRecord::Base
75
75
  def self.add_word(word)
76
76
  words = [word]
77
77
  phrases = self.connection.select_all("SELECT phrase from smart_search_similarities").map {|r| r["phrase"] }
78
- words += phrases.select {|p| self.match_words(p,word) >= SIMILARITY_FACTOR }
78
+ words += phrases.select {|p| self.match_words(p,word) >= SIMILARITY_FACTOR && (word.size - p.size).abs < 2 }
79
79
 
80
80
  self.create_from_text(words.join(" "))
81
81
  end
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.91
4
+ version: 0.0.96
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Eck
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-16 00:00:00.000000000 Z
11
+ date: 2018-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: unicode-emoji
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  description: SmartSearch adds full-text search functions to ActiveRecord running with
70
84
  MySQL, including search for similiar words. Its fast, simple, and works with almost
71
85
  zero-config!