searchkick 0.2.7 → 0.2.8

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: d8597f4228cb190f5e40a6cd1e9819925cb54647
4
- data.tar.gz: b5c87544aabc35fdc1c1d9aa079c11cd19e2a367
3
+ metadata.gz: 017b8175ed8d15abb422c8ac7ee965ea2e527799
4
+ data.tar.gz: f88f3e7cb91c76f6f3ae2c71bb08de14c56c4d8f
5
5
  SHA512:
6
- metadata.gz: 9ede2a96713154c701adfdf8f2650ae3e88846fb8b01843f7c65b5abea8c1e0d97b96239773a2bec52e835f646d343c1cf76aacca95dc040f5f95069c1f884a3
7
- data.tar.gz: 15b4b765bf82bd96272a78a45253f2df37a500ae8832c41301dc009a715eeae96d19ca5c53487740a82ba39c6a80312d5bfbed658e1c880229665e744ff88f7d
6
+ metadata.gz: 04881e972883815eee7df6e2cf1a12d6e121611b82736553ea2efdc307e9af046cde691450a7610ac29ee21aae5dca9b58ff55b3891ea8856f538c0de84f135d
7
+ data.tar.gz: 6f1471121e4882f0c9f3207e7f88769047bb9f99de85626e34a72978cd18c706c3c9754ac1c2d79235ca5ec4163ebf9e1705d4ad266d05b4f3983a23c0453ff6
@@ -1,3 +1,8 @@
1
+ ## 0.2.8
2
+
3
+ - Added option to disable callbacks
4
+ - Fixed bug with facets with Elasticsearch 0.90.5
5
+
1
6
  ## 0.2.7
2
7
 
3
8
  - Added limit to facet
data/README.md CHANGED
@@ -434,7 +434,15 @@ class Product < ActiveRecord::Base
434
434
  end
435
435
  ```
436
436
 
437
- Eagar load associations
437
+ Turn off callbacks
438
+
439
+ ```ruby
440
+ class Product < ActiveRecord::Base
441
+ searchkick callbacks: false
442
+ end
443
+ ```
444
+
445
+ Eager load associations
438
446
 
439
447
  ```ruby
440
448
  Product.search "milk", include: [:brand, :stores]
@@ -11,7 +11,7 @@ module Searchkick
11
11
  extend Searchkick::Reindex
12
12
  include Searchkick::Similar
13
13
  include Tire::Model::Search
14
- include Tire::Model::Callbacks
14
+ include Tire::Model::Callbacks unless options[:callbacks] == false
15
15
  tire do
16
16
  index_name options[:index_name] || [klass.model_name.plural, searchkick_env].join("_")
17
17
  end
@@ -243,7 +243,7 @@ module Searchkick
243
243
  # http://elasticsearch-users.115913.n3.nabble.com/Is-pagination-possible-in-termsStatsFacet-td3422943.html
244
244
 
245
245
  facet_filters = where_filters.call(facet_options[:where])
246
- if facet_filters
246
+ if facet_filters.any?
247
247
  payload[:facets][field][:facet_filter] = {
248
248
  and: {
249
249
  filters: facet_filters
@@ -1,3 +1,3 @@
1
1
  module Searchkick
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchkick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-24 00:00:00.000000000 Z
11
+ date: 2013-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tire