dynamic_sunspot_search 0.1.3 → 0.1.4

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: 057d51285b3fcce265bf19561a6d04cb41b63eef
4
- data.tar.gz: d5cde668784329378f7e5f3c93d1d712d0cce417
3
+ metadata.gz: 565d7796a1d315c414378899d093e4deb545758f
4
+ data.tar.gz: f5ebdd130d46165a6c96e490ef352bf4cfd93058
5
5
  SHA512:
6
- metadata.gz: 62524c3fe09f6b10b23fdbe455e9bd8951db44a0c850c96c0e28d3c3aa149a9a05f9979e565f166baa23989ed1a8101dded0a8bbaaa190b623981bc26a2801cc
7
- data.tar.gz: 6856caf7f073660ef89d39e074711b5a88b3777c418009572c7ae4c9d6e0fa97dc24f42483a3d837626220d67457387776a382f528e89d22c8c057e7edc68916
6
+ metadata.gz: 15585431f73d0f3412855a3c27a8100881e7a7ee51da91e44f6ff36887b50c49c3a8954cc3c514274bdef7b87153e61eac6dfb67308324b74cfa0bb93a5a9c90
7
+ data.tar.gz: 8b7af8c62c9b3dcc30337484a123c1a0458bf1b279208eb96e7e05afecc1eb091701e9c540318ded8f6d718e8567fdea2a6a33217907c0a31d77cdccdc66ce4e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dynamic_sunspot_search (0.1.3)
4
+ dynamic_sunspot_search (0.1.4)
5
5
  activesupport
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -666,7 +666,7 @@ class Post
666
666
  ```
667
667
 
668
668
  Then by using the `boost_receny` method, where half_life defines the half life
669
- period of the exponential decay function:
669
+ period of the exponential decay function (non-integer values will be rounded down):
670
670
 
671
671
  ```ruby
672
672
  # Posts that were published 5 day ago will have their scores cut in half
@@ -703,13 +703,13 @@ Post.dynamic_search({
703
703
  },
704
704
  })
705
705
 
706
- # Posts that were published 29.5 months ago will have their scores cut in half
706
+ # Posts that were published 29 months ago will have their scores cut in half
707
707
  Post.dynamic_search({
708
708
  fulltext: 'pizza',
709
709
  boost_recency: {
710
710
  field: :published_at,
711
711
  half_life: {
712
- months: 29.5,
712
+ months: 29,
713
713
  },
714
714
  },
715
715
  })
@@ -26,7 +26,7 @@ module DynamicSunspotSearch
26
26
  end
27
27
 
28
28
  def self.build_boost_string(field, half_life)
29
- half_life_ms = calculate_half_life_ms(half_life)
29
+ half_life_ms = calculate_half_life_ms(half_life).to_i
30
30
  half_life_recip = BigDecimal((1.0/(half_life_ms)).to_s).to_s('E').downcase
31
31
  "recip(ms(NOW,#{field.to_s}_dt),#{half_life_recip},100,1)"
32
32
  end
@@ -1,3 +1,3 @@
1
1
  module DynamicSunspotSearch
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamic_sunspot_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Bryant