searchkick 4.1.0 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +102 -96
- data/README.md +33 -5
- data/lib/searchkick/bulk_indexer.rb +2 -0
- data/lib/searchkick/index_options.rb +29 -1
- data/lib/searchkick/query.rb +3 -2
- data/lib/searchkick/version.rb +1 -1
- data/lib/tasks/searchkick.rake +7 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79cd2e4afe02598dbdc951ed222c98ab51c8f6b0580c7beb70d7f6f5e9223c8f
|
4
|
+
data.tar.gz: 804ae10724df4b1f72fc93f157e185cd6acbc734952c64e1c596d20f26360ce9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 732852787481b5aaf69edda3850c50846d5d07a55ba73d41dbee864988f04c5480c8c1535af6b82374982da4f95de5735f36433e6a37b46a41053ecc975fc9ef
|
7
|
+
data.tar.gz: 6d4408714af66540fc2868d2d9d4bd7b72d468150f5a29c9200d4eb349ee89f3155c98536742eb0015f905de644345e832af3a752613007d424cbb2c353051c2
|
data/CHANGELOG.md
CHANGED
@@ -1,24 +1,30 @@
|
|
1
|
-
## 4.1.
|
1
|
+
## 4.1.1 (2019-11-19)
|
2
|
+
|
3
|
+
- Added `chinese2` and `korean2` languages
|
4
|
+
- Improved performance of async full reindex
|
5
|
+
- Fixed `searchkick:reindex:all` rake task for Rails 6
|
6
|
+
|
7
|
+
## 4.1.0 (2019-08-01)
|
2
8
|
|
3
9
|
- Added `like` operator
|
4
10
|
- Added `exists` operator
|
5
11
|
- Added warnings for certain regular expressions
|
6
12
|
- Fixed anchored regular expressions
|
7
13
|
|
8
|
-
## 4.0.2
|
14
|
+
## 4.0.2 (2019-06-04)
|
9
15
|
|
10
16
|
- Added block form of `scroll`
|
11
17
|
- Added `clear_scroll` method
|
12
18
|
- Fixed custom mappings
|
13
19
|
|
14
|
-
## 4.0.1
|
20
|
+
## 4.0.1 (2019-05-30)
|
15
21
|
|
16
22
|
- Added support for scroll API
|
17
23
|
- Made type optional for custom mapping for Elasticsearch 6
|
18
24
|
- Fixed error when suggestions empty
|
19
25
|
- Fixed `models` option with inheritance
|
20
26
|
|
21
|
-
## 4.0.0
|
27
|
+
## 4.0.0 (2019-04-11)
|
22
28
|
|
23
29
|
- Added support for Elasticsearch 7
|
24
30
|
- Added `models` option
|
@@ -28,7 +34,7 @@ Breaking changes
|
|
28
34
|
- Removed support for Elasticsearch 5
|
29
35
|
- Removed support for multi-word synonyms (they no longer work with shingles)
|
30
36
|
|
31
|
-
## 3.1.3
|
37
|
+
## 3.1.3 (2019-04-11)
|
32
38
|
|
33
39
|
- Added support for endless ranges
|
34
40
|
- Added support for routing to `similar` method
|
@@ -37,7 +43,7 @@ Breaking changes
|
|
37
43
|
- Fixed error with some language stemmers and Elasticsearch 6.5
|
38
44
|
- Fixed issue with misspellings below and body block
|
39
45
|
|
40
|
-
## 3.1.2
|
46
|
+
## 3.1.2 (2018-09-27)
|
41
47
|
|
42
48
|
- Improved performance of indices boost
|
43
49
|
- Fixed deletes with routing and `async` callbacks
|
@@ -45,7 +51,7 @@ Breaking changes
|
|
45
51
|
- Fixed deprecation warnings
|
46
52
|
- Fixed field misspellings for older partial match format
|
47
53
|
|
48
|
-
## 3.1.1
|
54
|
+
## 3.1.1 (2018-08-09)
|
49
55
|
|
50
56
|
- Added per-field misspellings
|
51
57
|
- Added `case_sensitive` option
|
@@ -54,7 +60,7 @@ Breaking changes
|
|
54
60
|
- Fixed `exclude` option with match all
|
55
61
|
- Fixed `with_highlights` method
|
56
62
|
|
57
|
-
## 3.1.0
|
63
|
+
## 3.1.0 (2018-05-12)
|
58
64
|
|
59
65
|
- Added `:inline` as alias for `true` for `callbacks` and `mode` options
|
60
66
|
- Friendlier error message for bad mapping with partial matches
|
@@ -63,7 +69,7 @@ Breaking changes
|
|
63
69
|
- Fixed `with_hit` and `with_highlights` when records in search index do not exist in database
|
64
70
|
- Fixed error with highlights and match all
|
65
71
|
|
66
|
-
## 3.0.3
|
72
|
+
## 3.0.3 (2018-04-22)
|
67
73
|
|
68
74
|
- Added support for pagination with `body` option
|
69
75
|
- Added `boost_by_recency` option
|
@@ -72,19 +78,19 @@ Breaking changes
|
|
72
78
|
- Fixed error with optional operators in Ruby regexp
|
73
79
|
- Fixed deprecation warnings for Elasticsearch 6.2+
|
74
80
|
|
75
|
-
## 3.0.2
|
81
|
+
## 3.0.2 (2018-03-26)
|
76
82
|
|
77
83
|
- Added support for Korean and Vietnamese
|
78
84
|
- Fixed `Unsupported argument type: Symbol` for async partial reindex
|
79
85
|
- Fixed infinite recursion with multi search and misspellings below
|
80
86
|
- Do not raise an error when `id` is indexed
|
81
87
|
|
82
|
-
## 3.0.1
|
88
|
+
## 3.0.1 (2018-03-14)
|
83
89
|
|
84
90
|
- Added `scope` option for partial reindex
|
85
91
|
- Added support for Japanese, Polish, and Ukrainian
|
86
92
|
|
87
|
-
## 3.0.0
|
93
|
+
## 3.0.0 (2018-03-03)
|
88
94
|
|
89
95
|
- Added support for Chinese
|
90
96
|
- No longer requires fields to query for Elasticsearch 6
|
@@ -107,7 +113,7 @@ Breaking changes
|
|
107
113
|
- Removed `with_details` - use `with_highlights` instead
|
108
114
|
- Bumped default `limit` to 10,000
|
109
115
|
|
110
|
-
## 2.5.0
|
116
|
+
## 2.5.0 (2018-02-15)
|
111
117
|
|
112
118
|
- Try requests 3 times before raising error
|
113
119
|
- Better exception when trying to access results for failed multi-search query
|
@@ -118,14 +124,14 @@ Breaking changes
|
|
118
124
|
- Added `scope_results` option
|
119
125
|
- Added `factor` option to `boost_by_distance`
|
120
126
|
|
121
|
-
## 2.4.0
|
127
|
+
## 2.4.0 (2017-11-14)
|
122
128
|
|
123
129
|
- Fixed `similar` for Elasticsearch 6
|
124
130
|
- Added `inheritance` option
|
125
131
|
- Added `_type` option
|
126
132
|
- Fixed `Must specify fields to search` error when searching `*`
|
127
133
|
|
128
|
-
## 2.3.2
|
134
|
+
## 2.3.2 (2017-09-08)
|
129
135
|
|
130
136
|
- Added `_all` and `default_fields` options
|
131
137
|
- Added global `index_prefix` option
|
@@ -137,14 +143,14 @@ Breaking changes
|
|
137
143
|
- Fixed bug where `routing` and `type` options were silently ignored with `body` option
|
138
144
|
- Fixed `reindex(async: true)` for non-numeric primary keys in Postgres
|
139
145
|
|
140
|
-
## 2.3.1
|
146
|
+
## 2.3.1 (2017-07-06)
|
141
147
|
|
142
148
|
- Added support for `reindex(async: true)` for non-numeric primary keys
|
143
149
|
- Added `conversions_term` option
|
144
150
|
- Added support for passing fields to `suggest` option
|
145
151
|
- Fixed `page_view_entries` for Kaminari
|
146
152
|
|
147
|
-
## 2.3.0
|
153
|
+
## 2.3.0 (2017-05-06)
|
148
154
|
|
149
155
|
- Fixed analyzer on dynamically mapped fields
|
150
156
|
- Fixed error with `similar` method and `_all` field
|
@@ -152,54 +158,54 @@ Breaking changes
|
|
152
158
|
- Added `queue_name` option
|
153
159
|
- No longer require synonyms to be lowercase
|
154
160
|
|
155
|
-
## 2.2.1
|
161
|
+
## 2.2.1 (2017-04-16)
|
156
162
|
|
157
163
|
- Added `avg`, `cardinality`, `max`, `min`, and `sum` aggregations
|
158
164
|
- Added `load: {dumpable: true}` option
|
159
165
|
- Added `index_suffix` option
|
160
166
|
- Accept string for `exclude` option
|
161
167
|
|
162
|
-
## 2.2.0
|
168
|
+
## 2.2.0 (2017-03-19)
|
163
169
|
|
164
170
|
- Fixed bug with text values longer than 256 characters and `_all` field - see [#850](https://github.com/ankane/searchkick/issues/850)
|
165
171
|
- Fixed issue with `_all` field in `searchable`
|
166
172
|
- Fixed `exclude` option with `word_start`
|
167
173
|
|
168
|
-
## 2.1.1
|
174
|
+
## 2.1.1 (2017-01-17)
|
169
175
|
|
170
176
|
- Fixed duplicate notifications
|
171
177
|
- Added support for `connection_pool`
|
172
178
|
- Added `exclude` option
|
173
179
|
|
174
|
-
## 2.1.0
|
180
|
+
## 2.1.0 (2017-01-15)
|
175
181
|
|
176
182
|
- Background reindexing and queues are officially supported
|
177
183
|
- Log updates and deletes
|
178
184
|
|
179
|
-
## 2.0.4
|
185
|
+
## 2.0.4 (2017-01-15)
|
180
186
|
|
181
187
|
- Added support for queuing updates [experimental]
|
182
188
|
- Added `refresh_interval` option to `reindex`
|
183
189
|
- Prefer `search_index` over `searchkick_index`
|
184
190
|
|
185
|
-
## 2.0.3
|
191
|
+
## 2.0.3 (2017-01-12)
|
186
192
|
|
187
193
|
- Added `async` option to `reindex` [experimental]
|
188
194
|
- Added `misspellings?` method to results
|
189
195
|
|
190
|
-
## 2.0.2
|
196
|
+
## 2.0.2 (2017-01-08)
|
191
197
|
|
192
198
|
- Added `retain` option to `reindex`
|
193
199
|
- Added support for attributes in highlight tags
|
194
200
|
- Fixed potentially silent errors in reindex job
|
195
201
|
- Improved syntax for `boost_by_distance`
|
196
202
|
|
197
|
-
## 2.0.1
|
203
|
+
## 2.0.1 (2016-12-30)
|
198
204
|
|
199
205
|
- Added `search_hit` and `search_highlights` methods to models
|
200
206
|
- Improved reindex performance
|
201
207
|
|
202
|
-
## 2.0.0
|
208
|
+
## 2.0.0 (2016-12-28)
|
203
209
|
|
204
210
|
- Added support for `reindex` on associations
|
205
211
|
|
@@ -218,75 +224,75 @@ Breaking changes
|
|
218
224
|
- The `unsearchable` and `only_analyzed` options have been removed in favor of `searchable` and `filterable`
|
219
225
|
- `load: false` no longer returns an array in Elasticsearch 2
|
220
226
|
|
221
|
-
## 1.5.1
|
227
|
+
## 1.5.1 (2016-12-28)
|
222
228
|
|
223
229
|
- Added `client_options`
|
224
230
|
- Added `refresh` option to `reindex` method
|
225
231
|
- Improved syntax for partial reindex
|
226
232
|
|
227
|
-
## 1.5.0
|
233
|
+
## 1.5.0 (2016-12-23)
|
228
234
|
|
229
235
|
- Added support for geo shape indexing and queries
|
230
236
|
- Added `_and`, `_or`, `_not` to `where` option
|
231
237
|
|
232
|
-
## 1.4.2
|
238
|
+
## 1.4.2 (2016-12-21)
|
233
239
|
|
234
240
|
- Added support for directional synonyms
|
235
241
|
- Easier AWS setup
|
236
242
|
- Fixed `total_docs` method for ES 5+
|
237
243
|
- Fixed exception on update errors
|
238
244
|
|
239
|
-
## 1.4.1
|
245
|
+
## 1.4.1 (2016-12-11)
|
240
246
|
|
241
247
|
- Added `partial_reindex` method
|
242
248
|
- Added `debug` option to `search` method
|
243
249
|
- Added `profile` option
|
244
250
|
|
245
|
-
## 1.4.0
|
251
|
+
## 1.4.0 (2016-10-26)
|
246
252
|
|
247
253
|
- Official support for Elasticsearch 5
|
248
254
|
- Boost exact matches for partial matching
|
249
255
|
- Added `searchkick_debug` method
|
250
256
|
- Added `geo_polygon` filter
|
251
257
|
|
252
|
-
## 1.3.6
|
258
|
+
## 1.3.6 (2016-10-08)
|
253
259
|
|
254
260
|
- Fixed `Job adapter not found` error
|
255
261
|
|
256
|
-
## 1.3.5
|
262
|
+
## 1.3.5 (2016-09-27)
|
257
263
|
|
258
264
|
- Added support for Elasticsearch 5.0 beta
|
259
265
|
- Added `request_params` option
|
260
266
|
- Added `filterable` option
|
261
267
|
|
262
|
-
## 1.3.4
|
268
|
+
## 1.3.4 (2016-08-23)
|
263
269
|
|
264
270
|
- Added `resume` option to reindex
|
265
271
|
- Added search timeout to payload
|
266
272
|
|
267
|
-
## 1.3.3
|
273
|
+
## 1.3.3 (2016-08-02)
|
268
274
|
|
269
275
|
- Fix for namespaced models (broken in 1.3.2)
|
270
276
|
|
271
|
-
## 1.3.2
|
277
|
+
## 1.3.2 (2016-08-01)
|
272
278
|
|
273
279
|
- Added `body_options` option
|
274
280
|
- Added `date_histogram` aggregation
|
275
281
|
- Added `indices_boost` option
|
276
282
|
- Added support for multiple conversions
|
277
283
|
|
278
|
-
## 1.3.1
|
284
|
+
## 1.3.1 (2016-07-10)
|
279
285
|
|
280
286
|
- Fixed error with Ruby 2.0
|
281
287
|
- Fixed error with indexing large fields
|
282
288
|
|
283
|
-
## 1.3.0
|
289
|
+
## 1.3.0 (2016-05-04)
|
284
290
|
|
285
291
|
- Added support for Elasticsearch 5.0 alpha
|
286
292
|
- Added support for phrase matches
|
287
293
|
- Added support for procs for `index_prefix` option
|
288
294
|
|
289
|
-
## 1.2.1
|
295
|
+
## 1.2.1 (2016-02-15)
|
290
296
|
|
291
297
|
- Added `multi_search` method
|
292
298
|
- Added support for routing for Elasticsearch 2
|
@@ -294,7 +300,7 @@ Breaking changes
|
|
294
300
|
- Fixed error with instrumentation for searching multiple models
|
295
301
|
- Fixed instrumentation for bulk updates
|
296
302
|
|
297
|
-
## 1.2.0
|
303
|
+
## 1.2.0 (2016-02-03)
|
298
304
|
|
299
305
|
- Fixed deprecation warnings with `alias_method_chain`
|
300
306
|
- Added `analyzed_only` option for large text fields
|
@@ -302,18 +308,18 @@ Breaking changes
|
|
302
308
|
- Fixed issue in `similar` method with `per_page` option
|
303
309
|
- Added basic support for multiple models
|
304
310
|
|
305
|
-
## 1.1.2
|
311
|
+
## 1.1.2 (2015-12-18)
|
306
312
|
|
307
313
|
- Added bulk updates with `callbacks` method
|
308
314
|
- Added `bulk_delete` method
|
309
315
|
- Added `search_timeout` option
|
310
316
|
- Fixed bug with new location format for `boost_by_distance`
|
311
317
|
|
312
|
-
## 1.1.1
|
318
|
+
## 1.1.1 (2015-12-14)
|
313
319
|
|
314
320
|
- Added support for `{lat: lat, lon: lon}` as preferred format for locations
|
315
321
|
|
316
|
-
## 1.1.0
|
322
|
+
## 1.1.0 (2015-12-08)
|
317
323
|
|
318
324
|
- Added `below` option to misspellings to improve performance
|
319
325
|
- Fixed synonyms for `word_*` partial matches
|
@@ -323,25 +329,25 @@ Breaking changes
|
|
323
329
|
- Added `word` option
|
324
330
|
- Added highlighted fields to `load: false`
|
325
331
|
|
326
|
-
## 1.0.3
|
332
|
+
## 1.0.3 (2015-11-27)
|
327
333
|
|
328
334
|
- Added support for Elasticsearch 2.1
|
329
335
|
|
330
|
-
## 1.0.2
|
336
|
+
## 1.0.2 (2015-11-15)
|
331
337
|
|
332
338
|
- Throw `Searchkick::ImportError` for errors when importing records
|
333
339
|
- Errors now inherit from `Searchkick::Error`
|
334
340
|
- Added `order` option to aggregations
|
335
341
|
- Added `mapping` method
|
336
342
|
|
337
|
-
## 1.0.1
|
343
|
+
## 1.0.1 (2015-11-05)
|
338
344
|
|
339
345
|
- Added aggregations method to get raw response
|
340
346
|
- Use `execute: false` for lazy loading
|
341
347
|
- Return nil when no aggs
|
342
348
|
- Added emoji search
|
343
349
|
|
344
|
-
## 1.0.0
|
350
|
+
## 1.0.0 (2015-10-30)
|
345
351
|
|
346
352
|
- Added support for Elasticsearch 2.0
|
347
353
|
- Added support for aggregations
|
@@ -355,7 +361,7 @@ Breaking changes
|
|
355
361
|
- Enabled misspellings by default for partial matches
|
356
362
|
- Enabled transpositions by default for misspellings
|
357
363
|
|
358
|
-
## 0.9.1
|
364
|
+
## 0.9.1 (2015-08-31)
|
359
365
|
|
360
366
|
- `and` now matches `&`
|
361
367
|
- Added `transpositions` option to misspellings
|
@@ -363,18 +369,18 @@ Breaking changes
|
|
363
369
|
- Added `prefix_length` option to `misspellings`
|
364
370
|
- Added ability to set env
|
365
371
|
|
366
|
-
## 0.9.0
|
372
|
+
## 0.9.0 (2015-06-07)
|
367
373
|
|
368
374
|
- Much better performance for where queries if no facets
|
369
375
|
- Added basic support for regex
|
370
376
|
- Added support for routing
|
371
377
|
- Made `Searchkick.disable_callbacks` thread-safe
|
372
378
|
|
373
|
-
## 0.8.7
|
379
|
+
## 0.8.7 (2015-02-14)
|
374
380
|
|
375
381
|
- Fixed Mongoid import
|
376
382
|
|
377
|
-
## 0.8.6
|
383
|
+
## 0.8.6 (2015-02-10)
|
378
384
|
|
379
385
|
- Added support for NoBrainer
|
380
386
|
- Added `stem_conversions: false` option
|
@@ -383,26 +389,26 @@ Breaking changes
|
|
383
389
|
- Fixed suggestions with partial match boost
|
384
390
|
- Fixed redefining existing instance methods in models
|
385
391
|
|
386
|
-
## 0.8.5
|
392
|
+
## 0.8.5 (2014-11-11)
|
387
393
|
|
388
394
|
- Added support for Elasticsearch 1.4
|
389
395
|
- Added `unsearchable` option
|
390
396
|
- Added `select: true` option
|
391
397
|
- Added `body` option
|
392
398
|
|
393
|
-
## 0.8.4
|
399
|
+
## 0.8.4 (2014-11-05)
|
394
400
|
|
395
401
|
- Added `boost_by_distance`
|
396
402
|
- More flexible highlight options
|
397
403
|
- Better `env` logic
|
398
404
|
|
399
|
-
## 0.8.3
|
405
|
+
## 0.8.3 (2014-09-20)
|
400
406
|
|
401
407
|
- Added support for ActiveJob
|
402
408
|
- Added `timeout` setting
|
403
409
|
- Fixed import with no records
|
404
410
|
|
405
|
-
## 0.8.2
|
411
|
+
## 0.8.2 (2014-08-18)
|
406
412
|
|
407
413
|
- Added `async` to `callbacks` option
|
408
414
|
- Added `wordnet` option
|
@@ -410,17 +416,17 @@ Breaking changes
|
|
410
416
|
- Catch misspelling of `misspellings` option
|
411
417
|
- Improved logging
|
412
418
|
|
413
|
-
## 0.8.1
|
419
|
+
## 0.8.1 (2014-08-16)
|
414
420
|
|
415
421
|
- Added `search_method_name` option
|
416
422
|
- Fixed `order` for array of hashes
|
417
423
|
- Added support for Mongoid 2
|
418
424
|
|
419
|
-
## 0.8.0
|
425
|
+
## 0.8.0 (2014-07-12)
|
420
426
|
|
421
427
|
- Added support for Elasticsearch 1.2
|
422
428
|
|
423
|
-
## 0.7.9
|
429
|
+
## 0.7.9 (2014-06-30)
|
424
430
|
|
425
431
|
- Added `tokens` method
|
426
432
|
- Added `json` option
|
@@ -428,86 +434,86 @@ Breaking changes
|
|
428
434
|
- Added `prev_page` for Kaminari pagination
|
429
435
|
- Added `import` option to reindex
|
430
436
|
|
431
|
-
## 0.7.8
|
437
|
+
## 0.7.8 (2014-06-22)
|
432
438
|
|
433
439
|
- Added `boost_by` and `boost_where` options
|
434
440
|
- Added ability to boost fields - `name^10`
|
435
441
|
- Added `select` option for `load: false`
|
436
442
|
|
437
|
-
## 0.7.7
|
443
|
+
## 0.7.7 (2014-06-10)
|
438
444
|
|
439
445
|
- Added support for automatic failover
|
440
446
|
- Fixed `operator` option (and default) for partial matches
|
441
447
|
|
442
|
-
## 0.7.6
|
448
|
+
## 0.7.6 (2014-05-20)
|
443
449
|
|
444
450
|
- Added `stats` option to facets
|
445
451
|
- Added `padding` option
|
446
452
|
|
447
|
-
## 0.7.5
|
453
|
+
## 0.7.5 (2014-05-13)
|
448
454
|
|
449
455
|
- Do not throw errors when index becomes out of sync with database
|
450
456
|
- Added custom exception types
|
451
457
|
- Fixed `offset` and `offset_value`
|
452
458
|
|
453
|
-
## 0.7.4
|
459
|
+
## 0.7.4 (2014-05-06)
|
454
460
|
|
455
461
|
- Fixed reindex with inheritance
|
456
462
|
|
457
|
-
## 0.7.3
|
463
|
+
## 0.7.3 (2014-04-30)
|
458
464
|
|
459
465
|
- Fixed multi-index searches
|
460
466
|
- Fixed suggestions for partial matches
|
461
467
|
- Added `offset` and `length` for improved pagination
|
462
468
|
|
463
|
-
## 0.7.2
|
469
|
+
## 0.7.2 (2014-04-24)
|
464
470
|
|
465
471
|
- Added smart facets
|
466
472
|
- Added more fields to `load: false` result
|
467
473
|
- Fixed logging for multi-index searches
|
468
474
|
- Added `first_page?` and `last_page?` for improved Kaminari support
|
469
475
|
|
470
|
-
## 0.7.1
|
476
|
+
## 0.7.1 (2014-04-12)
|
471
477
|
|
472
478
|
- Fixed huge issue w/ zero-downtime reindexing on 0.90
|
473
479
|
|
474
|
-
## 0.7.0
|
480
|
+
## 0.7.0 (2014-04-10)
|
475
481
|
|
476
482
|
- Added support for Elasticsearch 1.1
|
477
483
|
- Dropped support for Elasticsearch below 0.90.4 (unfortunate side effect of above)
|
478
484
|
|
479
|
-
## 0.6.3
|
485
|
+
## 0.6.3 (2014-04-08)
|
480
486
|
|
481
487
|
- Removed patron since no support for Windows
|
482
488
|
- Added error if `searchkick` is called multiple times
|
483
489
|
|
484
|
-
## 0.6.2
|
490
|
+
## 0.6.2 (2014-04-05)
|
485
491
|
|
486
492
|
- Added logging
|
487
493
|
- Fixed index_name option
|
488
494
|
- Added ability to use proc as the index name
|
489
495
|
|
490
|
-
## 0.6.1
|
496
|
+
## 0.6.1 (2014-03-24)
|
491
497
|
|
492
498
|
- Fixed huge issue w/ zero-downtime reindexing on 0.90 and elasticsearch-ruby 1.0
|
493
499
|
- Restore load: false behavior
|
494
500
|
- Restore total_entries method
|
495
501
|
|
496
|
-
## 0.6.0
|
502
|
+
## 0.6.0 (2014-03-22)
|
497
503
|
|
498
504
|
- Moved to elasticsearch-ruby
|
499
505
|
- Added support for modifying the query and viewing the response
|
500
506
|
- Added support for page_entries_info method
|
501
507
|
|
502
|
-
## 0.5.3
|
508
|
+
## 0.5.3 (2014-02-24)
|
503
509
|
|
504
510
|
- Fixed bug w/ word_* queries
|
505
511
|
|
506
|
-
## 0.5.2
|
512
|
+
## 0.5.2 (2014-02-12)
|
507
513
|
|
508
514
|
- Use after_commit hook for ActiveRecord to prevent data inconsistencies
|
509
515
|
|
510
|
-
## 0.5.1
|
516
|
+
## 0.5.1 (2014-02-12)
|
511
517
|
|
512
518
|
- Replaced stop words with common terms query
|
513
519
|
- Added language option
|
@@ -515,89 +521,89 @@ Breaking changes
|
|
515
521
|
- Fixed bug with MongoDB integer _id
|
516
522
|
- Fixed reindex bug when callbacks disabled
|
517
523
|
|
518
|
-
## 0.5.0
|
524
|
+
## 0.5.0 (2014-01-20)
|
519
525
|
|
520
526
|
- Better control over partial matches
|
521
527
|
- Added merge_mappings option
|
522
528
|
- Added batch_size option
|
523
529
|
- Fixed bug with nil where clauses
|
524
530
|
|
525
|
-
## 0.4.2
|
531
|
+
## 0.4.2 (2013-12-29)
|
526
532
|
|
527
533
|
- Added `should_index?` method to control which records are indexed
|
528
534
|
- Added ability to temporarily disable callbacks
|
529
535
|
- Added custom mappings
|
530
536
|
|
531
|
-
## 0.4.1
|
537
|
+
## 0.4.1 (2013-12-19)
|
532
538
|
|
533
539
|
- Fixed issue w/ inheritance mapping
|
534
540
|
|
535
|
-
## 0.4.0
|
541
|
+
## 0.4.0 (2013-12-11)
|
536
542
|
|
537
543
|
- Added support for Mongoid 4
|
538
544
|
- Added support for multiple locations
|
539
545
|
|
540
|
-
## 0.3.5
|
546
|
+
## 0.3.5 (2013-12-08)
|
541
547
|
|
542
548
|
- Added facet ranges
|
543
549
|
- Added all operator
|
544
550
|
|
545
|
-
## 0.3.4
|
551
|
+
## 0.3.4 (2013-11-22)
|
546
552
|
|
547
553
|
- Added highlighting
|
548
554
|
- Added :distance option to misspellings
|
549
555
|
- Fixed issue w/ BigDecimal serialization
|
550
556
|
|
551
|
-
## 0.3.3
|
557
|
+
## 0.3.3 (2013-11-04)
|
552
558
|
|
553
559
|
- Better error messages
|
554
560
|
- Added where: {field: nil} queries
|
555
561
|
|
556
|
-
## 0.3.2
|
562
|
+
## 0.3.2 (2013-11-02)
|
557
563
|
|
558
564
|
- Added support for single table inheritance
|
559
565
|
- Removed Tire::Model::Search
|
560
566
|
|
561
|
-
## 0.3.1
|
567
|
+
## 0.3.1 (2013-11-02)
|
562
568
|
|
563
569
|
- Added index_prefix option
|
564
570
|
- Fixed ES issue with incorrect facet counts
|
565
571
|
- Added option to turn off special characters
|
566
572
|
|
567
|
-
## 0.3.0
|
573
|
+
## 0.3.0 (2013-11-02)
|
568
574
|
|
569
575
|
- Fixed reversed coordinates
|
570
576
|
- Added bounded by a box queries
|
571
577
|
- Expanded `or` queries
|
572
578
|
|
573
|
-
## 0.2.8
|
579
|
+
## 0.2.8 (2013-09-30)
|
574
580
|
|
575
581
|
- Added option to disable callbacks
|
576
582
|
- Fixed bug with facets with Elasticsearch 0.90.5
|
577
583
|
|
578
|
-
## 0.2.7
|
584
|
+
## 0.2.7 (2013-09-23)
|
579
585
|
|
580
586
|
- Added limit to facet
|
581
587
|
- Improved similar items
|
582
588
|
|
583
|
-
## 0.2.6
|
589
|
+
## 0.2.6 (2013-09-10)
|
584
590
|
|
585
591
|
- Added option to disable misspellings
|
586
592
|
|
587
|
-
## 0.2.5
|
593
|
+
## 0.2.5 (2013-08-30)
|
588
594
|
|
589
595
|
- Added geospartial searches
|
590
596
|
- Create alias before importing document if no alias exists
|
591
597
|
- Fixed exception when :per_page option is a string
|
592
598
|
- Check `RAILS_ENV` if `RACK_ENV` is not set
|
593
599
|
|
594
|
-
## 0.2.4
|
600
|
+
## 0.2.4 (2013-08-20)
|
595
601
|
|
596
602
|
- Use `to_hash` instead of `as_json` for default `search_data` method
|
597
603
|
- Works for Mongoid 1.3
|
598
604
|
- Use one shard in test environment for consistent scores
|
599
605
|
|
600
|
-
## 0.2.3
|
606
|
+
## 0.2.3 (2013-08-16)
|
601
607
|
|
602
608
|
- Setup Travis
|
603
609
|
- Clean old indices before reindex
|
@@ -605,33 +611,33 @@ Breaking changes
|
|
605
611
|
- Fixed pagination
|
606
612
|
- Added `similar` method
|
607
613
|
|
608
|
-
## 0.2.2
|
614
|
+
## 0.2.2 (2013-08-11)
|
609
615
|
|
610
616
|
- Clean old indices after reindex
|
611
617
|
- More expansions for fuzzy queries
|
612
618
|
|
613
|
-
## 0.2.1
|
619
|
+
## 0.2.1 (2013-08-11)
|
614
620
|
|
615
621
|
- Added Rails logger
|
616
622
|
- Only fetch ids when `load: true`
|
617
623
|
|
618
|
-
## 0.2.0
|
624
|
+
## 0.2.0 (2013-08-10)
|
619
625
|
|
620
626
|
- Added autocomplete
|
621
627
|
- Added “Did you mean” suggestions
|
622
628
|
- Added personalized searches
|
623
629
|
|
624
|
-
## 0.1.4
|
630
|
+
## 0.1.4 (2013-08-03)
|
625
631
|
|
626
632
|
- Bug fix
|
627
633
|
|
628
|
-
## 0.1.3
|
634
|
+
## 0.1.3 (2013-08-03)
|
629
635
|
|
630
636
|
- Changed edit distance to one for misspellings
|
631
637
|
- Raise errors when indexing fails
|
632
638
|
- Fixed pagination
|
633
639
|
- Fixed :include option
|
634
640
|
|
635
|
-
## 0.1.2
|
641
|
+
## 0.1.2 (2013-07-30)
|
636
642
|
|
637
643
|
- Launch
|
data/README.md
CHANGED
@@ -4,6 +4,12 @@
|
|
4
4
|
|
5
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
6
|
|
7
|
+
---
|
8
|
+
|
9
|
+
[Searchkick Pro](https://searchkick.org/pro?utm_source=readme) is now available!
|
10
|
+
|
11
|
+
---
|
12
|
+
|
7
13
|
Searchkick handles:
|
8
14
|
|
9
15
|
- stemming - `tomatoes` matches `tomato`
|
@@ -24,6 +30,8 @@ Plus:
|
|
24
30
|
|
25
31
|
:tangerine: Battle-tested at [Instacart](https://www.instacart.com/opensource)
|
26
32
|
|
33
|
+
:speech_balloon: Get [handcrafted updates](https://chartkick.us7.list-manage.com/subscribe?u=952c861f99eb43084e0a49f98&id=6ea6541e8e&group[0][4]=true) for new features
|
34
|
+
|
27
35
|
[![Build Status](https://travis-ci.org/ankane/searchkick.svg?branch=master)](https://travis-ci.org/ankane/searchkick)
|
28
36
|
|
29
37
|
## Contents
|
@@ -129,6 +137,8 @@ Limit / offset
|
|
129
137
|
limit: 20, offset: 40
|
130
138
|
```
|
131
139
|
|
140
|
+
**Note:** By default, Elasticsearch [limits pagination](#deep-pagination) to the first 10,000 results for performance
|
141
|
+
|
132
142
|
Select
|
133
143
|
|
134
144
|
```ruby
|
@@ -308,10 +318,12 @@ end
|
|
308
318
|
A few languages require plugins:
|
309
319
|
|
310
320
|
- `chinese` - [analysis-ik plugin](https://github.com/medcl/elasticsearch-analysis-ik)
|
311
|
-
- `
|
321
|
+
- `chinese2` - [analysis-smartcn plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/7.4/analysis-smartcn.html)
|
322
|
+
- `japanese` - [analysis-kuromoji plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/7.4/analysis-kuromoji.html)
|
312
323
|
- `korean` - [analysis-openkoreantext plugin](https://github.com/open-korean-text/elasticsearch-analysis-openkoreantext)
|
313
|
-
- `
|
314
|
-
- `
|
324
|
+
- `korean2` - [analysis-nori plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/7.4/analysis-nori.html)
|
325
|
+
- `polish` - [analysis-stempel plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/7.4/analysis-stempel.html)
|
326
|
+
- `ukrainian` - [analysis-ukrainian plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/7.4/analysis-ukrainian.html)
|
315
327
|
- `vietnamese` - [analysis-vietnamese plugin](https://github.com/duydo/elasticsearch-analysis-vietnamese)
|
316
328
|
|
317
329
|
### Synonyms
|
@@ -1067,7 +1079,7 @@ heroku run rake searchkick:reindex CLASS=Product
|
|
1067
1079
|
Create an initializer `config/initializers/elasticsearch.rb` with:
|
1068
1080
|
|
1069
1081
|
```ruby
|
1070
|
-
ENV["ELASTICSEARCH_URL"] = "https://es-domain-1234.us-east-1.es.amazonaws.com"
|
1082
|
+
ENV["ELASTICSEARCH_URL"] = "https://es-domain-1234.us-east-1.es.amazonaws.com:443"
|
1071
1083
|
```
|
1072
1084
|
|
1073
1085
|
To use signed requests, include in your Gemfile:
|
@@ -1097,7 +1109,7 @@ rake searchkick:reindex CLASS=Product
|
|
1097
1109
|
Create an initializer `config/initializers/elasticsearch.rb` with:
|
1098
1110
|
|
1099
1111
|
```ruby
|
1100
|
-
ENV["ELASTICSEARCH_URL"] = "https://user:password@host"
|
1112
|
+
ENV["ELASTICSEARCH_URL"] = "https://user:password@host:port"
|
1101
1113
|
```
|
1102
1114
|
|
1103
1115
|
Then deploy and reindex:
|
@@ -1506,6 +1518,22 @@ end
|
|
1506
1518
|
products.clear_scroll
|
1507
1519
|
```
|
1508
1520
|
|
1521
|
+
## Deep Pagination
|
1522
|
+
|
1523
|
+
By default, Elasticsearch limits pagination to the first 10,000 results [for performance](https://www.elastic.co/guide/en/elasticsearch/guide/current/pagination.html). We don’t recommend changing this, but if you need to, you can use:
|
1524
|
+
|
1525
|
+
```ruby
|
1526
|
+
class Product < ApplicationRecord
|
1527
|
+
searchkick settings: {index: {max_result_window: 1000000000}}
|
1528
|
+
end
|
1529
|
+
```
|
1530
|
+
|
1531
|
+
And search with:
|
1532
|
+
|
1533
|
+
```ruby
|
1534
|
+
Product.search("pears", limit: 1000000000, body_options: {track_total_hits: true})
|
1535
|
+
```
|
1536
|
+
|
1509
1537
|
## Nested Data
|
1510
1538
|
|
1511
1539
|
To query nested data, use dot notation.
|
@@ -168,6 +168,20 @@ module Searchkick
|
|
168
168
|
}
|
169
169
|
)
|
170
170
|
|
171
|
+
stem = false
|
172
|
+
when "chinese2", "smartcn"
|
173
|
+
settings[:analysis][:analyzer].merge!(
|
174
|
+
default_analyzer => {
|
175
|
+
type: "smartcn"
|
176
|
+
},
|
177
|
+
searchkick_search: {
|
178
|
+
type: "smartcn"
|
179
|
+
},
|
180
|
+
searchkick_search2: {
|
181
|
+
type: "smartcn"
|
182
|
+
}
|
183
|
+
)
|
184
|
+
|
171
185
|
stem = false
|
172
186
|
when "japanese"
|
173
187
|
settings[:analysis][:analyzer].merge!(
|
@@ -196,6 +210,20 @@ module Searchkick
|
|
196
210
|
}
|
197
211
|
)
|
198
212
|
|
213
|
+
stem = false
|
214
|
+
when "korean2"
|
215
|
+
settings[:analysis][:analyzer].merge!(
|
216
|
+
default_analyzer => {
|
217
|
+
type: "nori"
|
218
|
+
},
|
219
|
+
searchkick_search: {
|
220
|
+
type: "nori"
|
221
|
+
},
|
222
|
+
searchkick_search2: {
|
223
|
+
type: "nori"
|
224
|
+
}
|
225
|
+
)
|
226
|
+
|
199
227
|
stem = false
|
200
228
|
when "vietnamese"
|
201
229
|
settings[:analysis][:analyzer].merge!(
|
@@ -211,7 +239,7 @@ module Searchkick
|
|
211
239
|
)
|
212
240
|
|
213
241
|
stem = false
|
214
|
-
when "polish", "ukrainian"
|
242
|
+
when "polish", "ukrainian"
|
215
243
|
settings[:analysis][:analyzer].merge!(
|
216
244
|
default_analyzer => {
|
217
245
|
type: language
|
data/lib/searchkick/query.rb
CHANGED
@@ -435,8 +435,9 @@ module Searchkick
|
|
435
435
|
if models.any? { |m| m != m.searchkick_klass }
|
436
436
|
Searchkick.warn("Passing child models to models option throws off hits and pagination - use type option instead")
|
437
437
|
|
438
|
-
# uncomment once aliases are supported with _index
|
439
|
-
#
|
438
|
+
# TODO uncomment once aliases are supported with _index
|
439
|
+
# should be ES 7.5
|
440
|
+
# see https://github.com/elastic/elasticsearch/pull/46640
|
440
441
|
# index_type_or =
|
441
442
|
# models.map do |m|
|
442
443
|
# v = {_index: m.searchkick_index.name}
|
data/lib/searchkick/version.rb
CHANGED
data/lib/tasks/searchkick.rake
CHANGED
@@ -16,7 +16,13 @@ namespace :searchkick do
|
|
16
16
|
namespace :reindex do
|
17
17
|
desc "reindex all models"
|
18
18
|
task all: :environment do
|
19
|
-
Rails.
|
19
|
+
if Rails.respond_to?(:autoloaders) && Rails.autoloaders.zeitwerk_enabled?
|
20
|
+
# fix for https://github.com/rails/rails/issues/37006
|
21
|
+
Zeitwerk::Loader.eager_load_all
|
22
|
+
else
|
23
|
+
Rails.application.eager_load!
|
24
|
+
end
|
25
|
+
|
20
26
|
Searchkick.models.each do |model|
|
21
27
|
puts "Reindexing #{model.name}..."
|
22
28
|
model.reindex
|
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: 4.1.
|
4
|
+
version: 4.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
|
-
rubygems_version: 3.0.
|
148
|
+
rubygems_version: 3.0.6
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: Intelligent search made easy with Rails and Elasticsearch
|