searchkick 0.1.1 → 0.1.2

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: 8b5ae6918d441a036655f1e686a97994c27cd3d0
4
- data.tar.gz: 8bfc3d79c77b03afefb8791c0663bb26cd6e6bda
3
+ metadata.gz: cffaa2412f04c693b99dbd54f530b22f7ab32c53
4
+ data.tar.gz: 2dd98e1341946940a3cb0997400fe88d2687f540
5
5
  SHA512:
6
- metadata.gz: b3883c5f4da5b1012e41350f3cc5356c9570d3482d8b9e7fe2bfd660de54b4028cee9841259c23e2f9eace042eb7c0d523ef43afd27c118dce156990980b49ea
7
- data.tar.gz: dd6cb042bd1de8627abe1f3aa61150684cf8f6d9235943b1b5f149d612fa26bface7b71ff019497ed76b0577019510bc6ff22ff152f78fde7de9443b81bb08ee
6
+ metadata.gz: 16f646bd8e81672e98dc619d25814f071037b3522d63d235e64ee2aa7af782c483ab08e139411dd0a7501bb1e73163b475b9fffb69b44483525ad01d8f4b6981
7
+ data.tar.gz: 95b73d727ddbe424a8e9167dd2b62c2fead9fefe326a08a6da3c26cf98a33d8d824cc2c2f68921dca25b1167e26baced0cf80a802b1c976f4049a87e4cef1fec
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # Searchkick
2
2
 
3
- :rocket: Search made easy
3
+ :rocket: Intelligent search made easy
4
4
 
5
- Searchkick provides sensible search defaults. It handles:
5
+ Searchkick learns what **your users** are looking for. As more people search, it gets smarter and the results get better. It’s friendly for developers - and magical for your users.
6
+
7
+ Searchkick handles:
6
8
 
7
9
  - stemming - `tomatoes` matches `tomato`
8
10
  - special characters - `jalapeno` matches `jalapeño`
@@ -14,7 +16,6 @@ Plus:
14
16
 
15
17
  - query like SQL - no need to learn a new query language
16
18
  - reindex without downtime
17
- - continually improve results from conversions - **pretty awesome**
18
19
 
19
20
  :tangerine: Battle-tested at [Instacart](https://www.instacart.com)
20
21
 
@@ -140,7 +141,7 @@ You must call `Product.reindex` after changing synonyms.
140
141
 
141
142
  ### Indexing
142
143
 
143
- Choose what data is indexed.
144
+ Control what data is indexed with the `search_data` method.
144
145
 
145
146
  ```ruby
146
147
  class Product < ActiveRecord::Base
@@ -168,9 +169,11 @@ end
168
169
 
169
170
  ### Continually Improve Results
170
171
 
171
- Use data on search conversions to improve results. This can make a **huge** difference.
172
+ Searchkick uses conversion data to learn what users are looking for.
173
+
174
+ First, choose a conversion metric for your application. At Instacart, an item added to the cart is a conversion.
172
175
 
173
- First, keep track of conversions. The database works well for low volume, but feel free to use Redis or another datastore.
176
+ Next, track the conversions. The database works well for low volume, but feel free to use Redis or another datastore.
174
177
 
175
178
  ```ruby
176
179
  class Search < ActiveRecord::Base
@@ -194,10 +197,10 @@ class Product < ActiveRecord::Base
194
197
  end
195
198
  ```
196
199
 
197
- Reindex and tell the search method to use conversions.
200
+ Reindex and set up a cron job to add new conversions daily.
198
201
 
199
202
  ```ruby
200
- Product.search "Fat Free Milk", conversions: true
203
+ heroku run rake searchkick:reindex CLASS=Product
201
204
  ```
202
205
 
203
206
  ### Facets
@@ -32,8 +32,7 @@ module Searchkick
32
32
  end
33
33
  end
34
34
  end
35
- # can't check mapping for conversions since the new index may not be built
36
- if options[:conversions]
35
+ unless options[:conversions] == false
37
36
  should do
38
37
  nested path: "conversions", score_mode: "total" do
39
38
  query do
@@ -1,3 +1,3 @@
1
1
  module Searchkick
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -280,7 +280,7 @@ class TestSearchkick < Minitest::Unit::TestCase
280
280
  end
281
281
 
282
282
  def assert_search(term, expected, options = {})
283
- assert_equal expected, Product.search(term, options.merge(fields: [:name], conversions: true)).map(&:name)
283
+ assert_equal expected, Product.search(term, options.merge(fields: [:name])).map(&:name)
284
284
  end
285
285
 
286
286
  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.1.1
4
+ version: 0.1.2
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-07-29 00:00:00.000000000 Z
11
+ date: 2013-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tire