xapian_db 1.3.7.1 → 1.3.8

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
- SHA1:
3
- metadata.gz: f5b58a771fe0958c2b5058fed842f532d02d83d2
4
- data.tar.gz: cf1801e0f6d3386031084d274073bc75572af6a1
2
+ SHA256:
3
+ metadata.gz: a9a56c8dcca3d9af676803407a5f0ba9ca07d72a33c877909f9e5b7bc0ab884c
4
+ data.tar.gz: 19f87585356eb95bbe54c4e22d10b770b953c09c74856ffe10441fcf053c530d
5
5
  SHA512:
6
- metadata.gz: 6c73a5ccda203e1242cea1aedb58e1e738f4fc599c89e2a2b7f37e77acb938392726164a5c6f4580595452a3fafa37faa466c07ba46d4f80461142f39fcb2656
7
- data.tar.gz: 22483ae031a7f96cc7ea13cf67b109699db418fef80d980b662b9339109384fe67961f2f82201d5d1de25cee34b292c3c11a32bb3f5f160cb9f096c85514e8d6
6
+ metadata.gz: 107aa90d69efc2dccd06f104a66fd9b0a252491c1110ebbc879e3998c74fd7619b1c41c523af7f8017611287ad339290f5a0aec72b07825687873af9f6780ae4
7
+ data.tar.gz: 3052ca4107227f97f48bbbc023478279e2f06c952b604d77269bb52ae3add718675940ce044a99b616037e801144ed09c474ad53ed7344853046e8200ce7d2aa
data/CHANGELOG.md CHANGED
@@ -1,178 +1,205 @@
1
- ##1.3.7.1 (March 3rd, 2018)
1
+ ## 1.3.8 (July 19th, 2021)
2
+
3
+ Fixes:
4
+
5
+ - xapian docs are deleted in the after commit hook in order to respect transaction rollbacks
6
+
7
+ ## 1.3.7.4 (October 27th, 2020)
8
+
9
+ Changes:
10
+
11
+ - Instantiation of a BigDecimal using 'BigDecimal.new()' has been replaced with the new format 'BigDecimal() -- this is compatible with BigDecimal v1.4.x and v2.0.x AND drops support for BigDecimal v1.3.5'
12
+
13
+ **NOTE: Dropping support for BigDecimal v1.3.5 also drops the support of Ruby 2.2.x and earlier versions of Ruby.**
14
+
15
+ ## 1.3.7.3 (November 30th, 2018)
2
16
 
3
17
  Changes:
4
18
 
5
- - Allow access to configured blueprints through XapianDb::DocumentBlueprint
19
+ - add support for ruby > 2.3.x
6
20
 
7
- ##1.3.7 (January 12th, 2016)
21
+ ## 1.3.7.2 (April 13th, 2018)
22
+
23
+ Changes:
24
+
25
+ - changed ownership
26
+
27
+ ## 1.3.7.1 (March 3rd, 2018)
28
+
29
+ Changes:
30
+
31
+ - Allow access to configured blueprints through XapianDb::DocumentBlueprint
32
+
33
+ ## 1.3.7 (January 12th, 2016)
8
34
 
9
35
  Breaking Changes:
10
36
 
11
- - search methods accept either a limit option OR page / per_page options, not both
37
+ - search methods accept either a limit option OR page / per_page options, not both
12
38
 
13
39
  Fixes:
14
40
 
15
- - `XapianDb.database.delete_docs_of_class(klass)` now deletes docs of all descendants of `klass`, too (if tracked)
41
+ - `XapianDb.database.delete_docs_of_class(klass)` now deletes docs of all descendants of `klass`, too (if tracked)
16
42
 
17
43
  Changes:
18
44
 
19
- - Ability to declare dependenices between blueprints
20
- - Support for result ordering
21
- - added a indexer preprocess callback to manipulate the terms that the indexer will index
45
+ - Ability to declare dependenices between blueprints
46
+ - Support for result ordering
47
+ - added a indexer preprocess callback to manipulate the terms that the indexer will index
22
48
 
23
- ##1.3.6 (August 14th, 2015)
49
+ ## 1.3.6 (August 14th, 2015)
24
50
 
25
51
  Changes:
26
52
 
27
- - The required Ruby version is now 2.0.0 since we started using keyword parameters in method definitions
28
- - Ability do define and handle dependencies between blueprints (see README)
29
- - explicit order option for searches
53
+ - The required Ruby version is now 2.0.0 since we started using keyword parameters in method definitions
54
+ - Ability do define and handle dependencies between blueprints (see README)
55
+ - explicit order option for searches
30
56
 
31
- ##1.3.5.4 (Jan 13th, 2015)
57
+ ## 1.3.5.4 (Jan 13th, 2015)
32
58
 
33
59
  Fixes:
34
60
 
35
- - path to database fixed in railtie
36
- - fix for xapian > 1.2.15
61
+ - path to database fixed in railtie
62
+ - fix for xapian > 1.2.15
37
63
 
38
- ##1.3.5.3 (May 22th, 2014)
64
+ ## 1.3.5.3 (May 22th, 2014)
39
65
 
40
66
  Fixes:
41
67
 
42
- - retry the search when a Xapian::DatabaseModifiedError occurs
68
+ - retry the search when a Xapian::DatabaseModifiedError occurs
43
69
 
44
- ##1.3.5.2 (January 3rd, 2014)
70
+ ## 1.3.5.2 (January 3rd, 2014)
45
71
 
46
72
  Fixes:
47
73
 
48
- - total_pages are calculated correctly when a limit option is passed (Thanks, Jan)
49
- - fix for will_paginate support
74
+ - total_pages are calculated correctly when a limit option is passed (Thanks, Jan)
75
+ - fix for will_paginate support
50
76
 
51
- ##1.3.5.1 (August 16th, 2013)
77
+ ## 1.3.5.1 (August 16th, 2013)
52
78
 
53
79
  Fixes:
54
80
 
55
- - namespaced models work again with rails 4
81
+ - namespaced models work again with rails 4
56
82
 
57
- ##1.3.5 (August 3rd, 2013)
83
+ ## 1.3.5 (August 3rd, 2013)
58
84
 
59
85
  Changes:
60
86
 
61
- - Rails4 deprecation resolved
62
- - licence information added tot the gemspec
87
+ - Rails4 deprecation resolved
88
+ - licence information added tot the gemspec
63
89
 
64
- ##1.3.4 (July 26th, 2013)
90
+ ## 1.3.4 (July 26th, 2013)
65
91
 
66
92
  Changes:
67
93
 
68
- - support for sidekiq queues
94
+ - support for sidekiq queues
69
95
 
70
- ##1.3.3.1 (June 23th, 2013)
96
+ ## 1.3.3.1 (June 23th, 2013)
71
97
 
72
98
  Fixes:
73
99
 
74
- - injected logical operators must be upper case in order to support Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE set to false
100
+ - injected logical operators must be upper case in order to support Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE set to false
75
101
 
76
- ##1.3.3 (June 23th, 2013)
102
+ ## 1.3.3 (June 23th, 2013)
77
103
 
78
104
  Changes:
79
105
 
80
- - xapian query parser flags are now configurable (see README)
106
+ - xapian query parser flags are now configurable (see README)
81
107
 
82
108
  Breaking Changes:
83
109
 
84
110
  - enable_phrase_search config option is no longer supported (use config.enable_query_flag Xapian::QueryParser::FLAG_PHRASE instead)
85
111
 
86
- ##1.3.2 (April 10th, 2013)
112
+ ## 1.3.2 (April 10th, 2013)
87
113
 
88
114
  Changes:
89
115
 
90
- - new no_split option for attributes and indexes; useful if you use a global term_splitter_count but want to disable splitting for
91
- a certain attribute
116
+ - new no_split option for attributes and indexes; useful if you use a global term_splitter_count but want to disable splitting for
117
+ a certain attribute
92
118
 
93
- ##1.3.1 (February 25th, 2013)
119
+ ## 1.3.1 (February 25th, 2013)
94
120
 
95
121
  Fixes:
96
122
 
97
- - json codec handles nil values gracefully
123
+ - json codec handles nil values gracefully
98
124
 
99
- ##1.3 (February 19th, 2013)
125
+ ## 1.3 (February 19th, 2013)
100
126
 
101
127
  Breaking Changes:
102
- - changed the internal serialization format for attributes; the new default is string, new codecs were added. YAML is not supported
103
- anymore, although you could implement a YAML-Codec on your own if you need it (see examples/custom_serialization.rb)
128
+
129
+ - changed the internal serialization format for attributes; the new default is string, new codecs were added. YAML is not supported
130
+ anymore, although you could implement a YAML-Codec on your own if you need it (see examples/custom_serialization.rb)
104
131
 
105
132
  Changes:
106
133
 
107
- - New option to enable / disable phrase search support
108
- - term splitter option to boost "live queries" (see README)
134
+ - New option to enable / disable phrase search support
135
+ - term splitter option to boost "live queries" (see README)
109
136
 
110
- ##1.2.5 (January 4th, 2013)
137
+ ## 1.2.5 (January 4th, 2013)
111
138
 
112
139
  Changes:
113
140
 
114
- - Define the min length a term must have to make it into the index (see README)
115
- - define if a method should be indexed with its method name so you can do field searches (e.g. name:kogler); defaults to true
141
+ - Define the min length a term must have to make it into the index (see README)
142
+ - define if a method should be indexed with its method name so you can do field searches (e.g. name:kogler); defaults to true
116
143
 
117
144
  Fixes:
118
145
 
119
- - query result creation optimized (lower memory footprint, better performance)
146
+ - query result creation optimized (lower memory footprint, better performance)
120
147
 
121
- ##1.2.4.7 (December 17th, 2012)
148
+ ## 1.2.4.7 (December 17th, 2012)
122
149
 
123
150
  Fixes:
124
151
 
125
- - database reset removed since it has concurrency problems
152
+ - database reset removed since it has concurrency problems
126
153
 
127
- ##1.2.4.6 (Decmber 17th, 2012)
154
+ ## 1.2.4.6 (Decmber 17th, 2012)
128
155
 
129
156
  Changes:
130
157
 
131
- - progressbar gem replaced by ruby-progressbar
132
- - XapianDb.rebuild_xapian_index resets the database to remove any stale index data
158
+ - progressbar gem replaced by ruby-progressbar
159
+ - XapianDb.rebuild_xapian_index resets the database to remove any stale index data
133
160
 
134
- ##1.2.4.5 (July 19th, 2012)
161
+ ## 1.2.4.5 (July 19th, 2012)
135
162
 
136
163
  Fixes:
137
164
 
138
- - Fixes requiring the environment when calling rake. Prevented eg creation of the database using rake db:create
165
+ - Fixes requiring the environment when calling rake. Prevented eg creation of the database using rake db:create
139
166
 
140
- ##1.2.4.4 (May 30h, 2012)
167
+ ## 1.2.4.4 (May 30h, 2012)
141
168
 
142
169
  Fixes:
143
170
 
144
- - do not add attributes with null values to a document
171
+ - do not add attributes with null values to a document
145
172
 
146
- ##1.2.4.3 (May 1st, 2012)
173
+ ## 1.2.4.3 (May 1st, 2012)
147
174
 
148
175
  Fixes:
149
176
 
150
- - handle null values on date and datetime attributes correctly
177
+ - handle null values on date and datetime attributes correctly
151
178
 
152
- ##1.2.4.2 (May 1st, 2012)
179
+ ## 1.2.4.2 (May 1st, 2012)
153
180
 
154
181
  Changes:
155
182
 
156
- - access the attributes of a xapian document as a hash table (like active record)
183
+ - access the attributes of a xapian document as a hash table (like active record)
157
184
 
158
- ##1.2.4.1 (April 5th, 2012)
185
+ ## 1.2.4.1 (April 5th, 2012)
159
186
 
160
187
  Fixes:
161
188
 
162
- - better indexing for attributes containing arrays (index rebuild recommended)
189
+ - better indexing for attributes containing arrays (index rebuild recommended)
163
190
 
164
- ##1.2.4 (March 6th, 2012)
191
+ ## 1.2.4 (March 6th, 2012)
165
192
 
166
193
  Features:
167
194
 
168
- - Codec for DateTime objects added
169
- - autoindex option for blueprints added
195
+ - Codec for DateTime objects added
196
+ - autoindex option for blueprints added
170
197
 
171
198
  Fixes:
172
199
 
173
- - the ActiveRecord after_commit hook must not reindex the object if it is a destroy action
200
+ - the ActiveRecord after_commit hook must not reindex the object if it is a destroy action
174
201
 
175
- ##1.2.3 (December 12th, 2011)
202
+ ## 1.2.3 (December 12th, 2011)
176
203
 
177
204
  Changes:
178
205
 
@@ -185,354 +212,354 @@ Changes:
185
212
  - added a rake task to rebuild the index
186
213
  - internal refactorings / optimizations
187
214
 
188
- ##1.2.2.2 (November 29th, 2011)
215
+ ## 1.2.2.2 (November 29th, 2011)
189
216
 
190
217
  Changes:
191
218
 
192
219
  - removed dependency to xapian-ruby to allow custom installs of the xapian binaries (see chapter Installing xapian binaries in the README)
193
220
 
194
- ##1.2.2.1 (November 22th, 2011)
221
+ ## 1.2.2.1 (November 22th, 2011)
195
222
 
196
223
  Fixes:
197
224
 
198
- - always use the correct table name for order clauses when indexing
199
- - allow nil values for attributes declared :as => :date
200
- - lazy load queue writers (beanstalk_writer, resque_writer) when needed
225
+ - always use the correct table name for order clauses when indexing
226
+ - allow nil values for attributes declared :as => :date
227
+ - lazy load queue writers (beanstalk_writer, resque_writer) when needed
201
228
 
202
- ##1.2.2 (November 15th, 2011)
229
+ ## 1.2.2 (November 15th, 2011)
203
230
 
204
231
  Features:
205
232
 
206
- - resultset accepts limit and paging options as strings
207
- - added natural sort order option for blueprints (see README for details)
233
+ - resultset accepts limit and paging options as strings
234
+ - added natural sort order option for blueprints (see README for details)
208
235
 
209
236
  IMPORTANT: FULL INDEX REBUILD REQUIRED FOR THIS RELEASE!
210
237
 
211
- ##1.2.1.1 (November 10th, 2011)
238
+ ## 1.2.1.1 (November 10th, 2011)
212
239
 
213
240
  Fixes:
214
241
 
215
- - resque writer wasn't loaded when beanstalk wasn't installed (thanks, javierv)
242
+ - resque writer wasn't loaded when beanstalk wasn't installed (thanks, javierv)
216
243
 
217
- ##1.2.1 (November 9th, 2011)
244
+ ## 1.2.1 (November 9th, 2011)
218
245
 
219
246
  Fixes:
220
247
 
221
- - removed explicit dependency on resque
248
+ - removed explicit dependency on resque
222
249
 
223
- ##1.2.0 (November 8th, 2011)
250
+ ## 1.2.0 (November 8th, 2011)
224
251
 
225
252
  Fixes:
226
253
 
227
- - find_similar_to supports the :limit option
254
+ - find_similar_to supports the :limit option
228
255
 
229
256
  Features:
230
257
 
231
- - new index worker / writer for resque (thanks, Michael)
232
- - support for namespaced models (thanks, Albert)
258
+ - new index worker / writer for resque (thanks, Michael)
259
+ - support for namespaced models (thanks, Albert)
233
260
 
234
- ##1.1.4 (October 25th, 2011)
261
+ ## 1.1.4 (October 25th, 2011)
235
262
 
236
263
  Fixes:
237
264
 
238
- - removed loading of the deprecated rake task from the railtie
265
+ - removed loading of the deprecated rake task from the railtie
239
266
 
240
- ##1.1.3 (October 24th, 2011)
267
+ ## 1.1.3 (October 24th, 2011)
241
268
 
242
269
  Fixes:
243
270
 
244
- - weight option for attributes and indexed values was not correctly applied
271
+ - weight option for attributes and indexed values was not correctly applied
245
272
 
246
- ##1.1.2 (September 10th, 2011)
273
+ ## 1.1.2 (September 10th, 2011)
247
274
 
248
275
  Fixes:
249
276
 
250
- - beanstalk_work flushes log messages (reinstall the worker script: rails generate xapian_db:install)
277
+ - beanstalk_work flushes log messages (reinstall the worker script: rails generate xapian_db:install)
251
278
 
252
279
  Features:
253
280
 
254
- - massive performance optimization in rebuild_xapian_index
281
+ - massive performance optimization in rebuild_xapian_index
255
282
 
256
- ##1.1.1 (September 9th, 2011)
283
+ ## 1.1.1 (September 9th, 2011)
257
284
 
258
285
  Fixes:
259
286
 
260
- - fixed a bug in XapianDb.rebuild_xapian_index that did not index all records of a klass; it ist highly recommended to run Xapian.rebuild_xapian_index after installing this version
287
+ - fixed a bug in XapianDb.rebuild_xapian_index that did not index all records of a klass; it ist highly recommended to run Xapian.rebuild_xapian_index after installing this version
261
288
 
262
289
  Features:
263
290
 
264
- - base query option for blueprints; may speed up reindexing signifiantly if you index associations
291
+ - base query option for blueprints; may speed up reindexing signifiantly if you index associations
265
292
 
266
- ##1.1 (September 7th, 2011)
293
+ ## 1.1 (September 7th, 2011)
267
294
 
268
295
  Fixes:
269
296
 
270
- - better handling of the beanstalk-client dependency
271
- - recreate the xapian index database if the configured path exists but does not contain a valid xapian index
272
- - support for non-integer primary keys (removed unneccesary to_i conversion)
297
+ - better handling of the beanstalk-client dependency
298
+ - recreate the xapian index database if the configured path exists but does not contain a valid xapian index
299
+ - support for non-integer primary keys (removed unneccesary to_i conversion)
273
300
 
274
301
  Features:
275
302
 
276
- - rails sample app upgraded to 3.1
277
- - support for value range queries (strings, dates, numbers)
278
- - sorting now works on a global query, too (XapianDb.search...)
279
- - global factes queries have now the same options like class scoped facet queries
280
- - Support for custom serialization into xapian documents; overwrite the serialization implementation in type_codec.rb or implement your own serialization for specific types (see examples/custom_serialization.rb)
281
- - support to reindex a single object while evaluation an ignore_if block (if present)
303
+ - rails sample app upgraded to 3.1
304
+ - support for value range queries (strings, dates, numbers)
305
+ - sorting now works on a global query, too (XapianDb.search...)
306
+ - global factes queries have now the same options like class scoped facet queries
307
+ - Support for custom serialization into xapian documents; overwrite the serialization implementation in type_codec.rb or implement your own serialization for specific types (see examples/custom_serialization.rb)
308
+ - support to reindex a single object while evaluation an ignore_if block (if present)
282
309
 
283
310
  IMPORTANT: YOU MUST REBUILD YOUR XAPIAN INDEX DATABASE SINCE THE INDEX STRUCTURE HAS CHANGED!
284
311
 
285
- ##1.0 (August 17th, 2011)
312
+ ## 1.0 (August 17th, 2011)
286
313
 
287
314
  Features:
288
315
 
289
- - find similar documents based on one or more reference documents
316
+ - find similar documents based on one or more reference documents
290
317
 
291
- ##0.5.15 (July 8th, 2011)
318
+ ## 0.5.15 (July 8th, 2011)
292
319
 
293
320
  Features:
294
321
 
295
- - faster install if the new, dependent gem containig xapian (xapian-ruby) is already installed
322
+ - faster install if the new, dependent gem containig xapian (xapian-ruby) is already installed
296
323
 
297
- ##0.5.14 (July 7th, 2011)
324
+ ## 0.5.14 (July 7th, 2011)
298
325
 
299
326
  Fixes:
300
327
 
301
- - fixed an issue in the beanstalk worker (delete task could not retrieve the xapian id from an already deleted object)
328
+ - fixed an issue in the beanstalk worker (delete task could not retrieve the xapian id from an already deleted object)
302
329
 
303
- ##0.5.13 (June 20th, 2011)
330
+ ## 0.5.13 (June 20th, 2011)
304
331
 
305
332
  Fixes:
306
333
 
307
- - handle attribute objects that return nil from to_s
334
+ - handle attribute objects that return nil from to_s
308
335
 
309
336
  Features:
310
337
 
311
- - updated the xapian source to 1.2.6
312
- - xapian source and build artefacts are removed after successful install
313
- - added support for namespaced classes
338
+ - updated the xapian source to 1.2.6
339
+ - xapian source and build artefacts are removed after successful install
340
+ - added support for namespaced classes
314
341
 
315
- ##0.5.12 (April 28th, 2011)
342
+ ## 0.5.12 (April 28th, 2011)
316
343
 
317
344
  Fixes:
318
345
 
319
- - avoid stale blueprint setups when an indexed class is reloaded
346
+ - avoid stale blueprint setups when an indexed class is reloaded
320
347
 
321
- ##0.5.11 (April 21st, 2011)
348
+ ## 0.5.11 (April 21st, 2011)
322
349
 
323
350
  Features:
324
351
 
325
- - XapianDb.search accepts all options supported by XapianDb::Database.search
326
- - Rails log entries include query execution time
327
- - small changes to the beanstalk worker error handling
352
+ - XapianDb.search accepts all options supported by XapianDb::Database.search
353
+ - Rails log entries include query execution time
354
+ - small changes to the beanstalk worker error handling
328
355
 
329
- ##0.5.10 (April 6th, 2011)
356
+ ## 0.5.10 (April 6th, 2011)
330
357
 
331
358
  Features:
332
359
 
333
- - the beanstalk worker is now implemented as a daemon script (execute 'rails generate xapian_db:install' to install it)
334
- - execute a block with auto indexing disabled (see 'Bulk inserts / updates / deletes' in teh README)
335
- - updated the xapian source to version 1.2.5
360
+ - the beanstalk worker is now implemented as a daemon script (execute 'rails generate xapian_db:install' to install it)
361
+ - execute a block with auto indexing disabled (see 'Bulk inserts / updates / deletes' in teh README)
362
+ - updated the xapian source to version 1.2.5
336
363
 
337
- ##0.5.9 (March 25th, 2011)
364
+ ## 0.5.9 (March 25th, 2011)
338
365
 
339
366
  Fixes:
340
367
 
341
- - indexing was broken in 0.5.8
368
+ - indexing was broken in 0.5.8
342
369
 
343
- ##0.5.8 (March 22th, 2011)
370
+ ## 0.5.8 (March 22th, 2011)
344
371
 
345
372
  Fixes:
346
373
 
347
- - automatic reindexing of a changed object now works when using beanstalk and the worker rake task
374
+ - automatic reindexing of a changed object now works when using beanstalk and the worker rake task
348
375
 
349
376
  Features:
350
377
 
351
- - support for transactions (see the README for details)
378
+ - support for transactions (see the README for details)
352
379
 
353
- ##0.5.7 (March 7th, 2011)
380
+ ## 0.5.7 (March 7th, 2011)
354
381
 
355
382
  Fixes:
356
383
 
357
- - limit_value on the resultset is calculated again when the resultset is empty (thanks, Javi)
358
- - added an order by id for rebuild_xapian_index to ensure that limit and offset work as expected
384
+ - limit_value on the resultset is calculated again when the resultset is empty (thanks, Javi)
385
+ - added an order by id for rebuild_xapian_index to ensure that limit and offset work as expected
359
386
 
360
387
  Features:
361
388
 
362
- - option to specify a specific adapter for a blueprint overriding the global configuration
389
+ - option to specify a specific adapter for a blueprint overriding the global configuration
363
390
 
364
- ##0.5.6 (February 28th, 2011)
391
+ ## 0.5.6 (February 28th, 2011)
365
392
 
366
393
  Features:
367
394
 
368
- - documents returned by a query have the new score property that reflects the match relevance in percent (1-100%)
369
- - added compatibility to the kaminari pagination gem (thanks, Javi)
370
- - added support for phrase searches (XapianDb.search('"this exact sentence"'))
395
+ - documents returned by a query have the new score property that reflects the match relevance in percent (1-100%)
396
+ - added compatibility to the kaminari pagination gem (thanks, Javi)
397
+ - added support for phrase searches (XapianDb.search('"this exact sentence"'))
371
398
 
372
- ##0.5.5 (February 25th, 2011)
399
+ ## 0.5.5 (February 25th, 2011)
373
400
 
374
401
  Fixes:
375
402
 
376
- - ":memory:" as a configuration option for a database works again (was broken in 0.5.4)
377
- - forcing utf-8 encoding on a spelling suggestion returned by the xapian query parser
403
+ - ":memory:" as a configuration option for a database works again (was broken in 0.5.4)
404
+ - forcing utf-8 encoding on a spelling suggestion returned by the xapian query parser
378
405
 
379
406
  Features:
380
407
 
381
- - configure only those environments in xapian_db.yml where you want to override the defaults
382
- - XapianDb.rebuild_xapian_index rebuilds the index for all blueprints
408
+ - configure only those environments in xapian_db.yml where you want to override the defaults
409
+ - XapianDb.rebuild_xapian_index rebuilds the index for all blueprints
383
410
 
384
- ##0.5.4 (February 22nd, 2011)
411
+ ## 0.5.4 (February 22nd, 2011)
385
412
 
386
413
  Fixes:
387
414
 
388
- - relative database paths in the config file are resolved correctly when the Rails server is started as a daemon (-d)
415
+ - relative database paths in the config file are resolved correctly when the Rails server is started as a daemon (-d)
389
416
 
390
417
  Breaking Changes:
391
418
 
392
- - the spelling suggestion of a query is now nil instead of an empty string if no suggestions were returned from xapian
393
- - the resultset class (what you get back from a query) has been refactored for easier handling. See the README ("Process the results")
394
- for details
419
+ - the spelling suggestion of a query is now nil instead of an empty string if no suggestions were returned from xapian
420
+ - the resultset class (what you get back from a query) has been refactored for easier handling. See the README ("Process the results")
421
+ for details
395
422
 
396
- ##0.5.3 (February 15th, 2011)
423
+ ## 0.5.3 (February 15th, 2011)
397
424
 
398
425
  Fixes:
399
426
 
400
- - index blueprints can now handle inheritance. If a class does not have its own index blueprint,
401
- xapian_db uses the index blueprint from its super class (if defined)
402
- - Added an ignore option to the blueprint definition to filter out objects that should not go into the index
427
+ - index blueprints can now handle inheritance. If a class does not have its own index blueprint,
428
+ xapian_db uses the index blueprint from its super class (if defined)
429
+ - Added an ignore option to the blueprint definition to filter out objects that should not go into the index
403
430
 
404
- ##0.5.2 (January 11th, 2011)
431
+ ## 0.5.2 (January 11th, 2011)
405
432
 
406
433
  Features:
407
434
 
408
- - xapian-core and xapian-ruby-bindings sources are now included and will be compiled and installed with the gem
435
+ - xapian-core and xapian-ruby-bindings sources are now included and will be compiled and installed with the gem
409
436
 
410
- ##0.5.1 (December 22th, 2010)
437
+ ## 0.5.1 (December 22th, 2010)
411
438
 
412
439
  Features:
413
440
 
414
- - simple facet support for indexed classes. Any attribute can be used in a facet search
441
+ - simple facet support for indexed classes. Any attribute can be used in a facet search
415
442
 
416
443
  Fixes:
417
444
 
418
- - attribute names that match a Xapian::Document method are not allowed
445
+ - attribute names that match a Xapian::Document method are not allowed
419
446
 
420
- ##0.5.0 (December 19th, 2010)
447
+ ## 0.5.0 (December 19th, 2010)
421
448
 
422
449
  Features:
423
450
 
424
- - beanstalk based index writer for production environments (multiple app instances, e.g. mongrel clusters,
425
- passenger...)
451
+ - beanstalk based index writer for production environments (multiple app instances, e.g. mongrel clusters,
452
+ passenger...)
426
453
 
427
- ##0.4.2 (December 17th, 2010)
454
+ ## 0.4.2 (December 17th, 2010)
428
455
 
429
456
  Features:
430
457
 
431
- - added a sample rails application to the repo
432
- - added the id attribute for documents based on ActiveRecord and Datamapper objects
458
+ - added a sample rails application to the repo
459
+ - added the id attribute for documents based on ActiveRecord and Datamapper objects
433
460
 
434
461
  Changes:
435
462
 
436
- - removed the language_method option from the blueprint configuration since it gives
437
- unpredictable results
463
+ - removed the language_method option from the blueprint configuration since it gives
464
+ unpredictable results
438
465
 
439
466
  Bugfixes:
440
467
 
441
- - fixed the initialization error in a Rails app if there is no xapian_db.yml config file
442
- - fixed the fallback to the global language when a model has an unsupported language and a
443
- language method is configured in the blueprint
444
- - fixed an issue with yaml deserialization of ActiveRecord objects (only the attributes hash
445
- should be serialized)
468
+ - fixed the initialization error in a Rails app if there is no xapian_db.yml config file
469
+ - fixed the fallback to the global language when a model has an unsupported language and a
470
+ language method is configured in the blueprint
471
+ - fixed an issue with yaml deserialization of ActiveRecord objects (only the attributes hash
472
+ should be serialized)
446
473
 
447
- ##0.4.1 (December 16th, 2010)
474
+ ## 0.4.1 (December 16th, 2010)
448
475
 
449
476
  Bugfixes:
450
477
 
451
- - fixed the handling of invalid page arguments in resultset.paginate. Invalid page arguments return
452
- an empty result set
453
- - searches with an empty search expression do not raise an exception anymore and return an empty
454
- resultset
478
+ - fixed the handling of invalid page arguments in resultset.paginate. Invalid page arguments return
479
+ an empty result set
480
+ - searches with an empty search expression do not raise an exception anymore and return an empty
481
+ resultset
455
482
 
456
- ##0.4.0 (December 15th, 2010)
483
+ ## 0.4.0 (December 15th, 2010)
457
484
 
458
485
  Features:
459
486
 
460
- - Simple facets implementation. The only facet supported is the class name of the indexed objects
461
- - Support for sorting (only for class searches, not for global searches)
462
- - The result of a search can be used with will_paginate
487
+ - Simple facets implementation. The only facet supported is the class name of the indexed objects
488
+ - Support for sorting (only for class searches, not for global searches)
489
+ - The result of a search can be used with will_paginate
463
490
 
464
491
  Bugfixes:
465
492
 
466
- - removed the class scope expression from the spelling suggestion when searching on a class
467
- - keys of the attributes and index hashes are now sorted to be compatible with ruby 1.8 (which does
468
- not preserve the order of the keys in a hash)
469
- - Fixed the problem that blueprint configurations got lost after the first request in the development
470
- env (Rails only). You should put your blueprints either into a class that is loaded by Rails or into
471
- the file config/xapian_blueprints.rb wich is loaded automatically by XapianDb
493
+ - removed the class scope expression from the spelling suggestion when searching on a class
494
+ - keys of the attributes and index hashes are now sorted to be compatible with ruby 1.8 (which does
495
+ not preserve the order of the keys in a hash)
496
+ - Fixed the problem that blueprint configurations got lost after the first request in the development
497
+ env (Rails only). You should put your blueprints either into a class that is loaded by Rails or into
498
+ the file config/xapian_blueprints.rb wich is loaded automatically by XapianDb
472
499
 
473
500
  **Since the internal structure of the index has changed, you must reindex your objects if you come from an
474
501
  earlier version of XapianDb!**
475
502
 
476
- ##0.3.4 (December 14th, 2010)
503
+ ## 0.3.4 (December 14th, 2010)
477
504
 
478
505
  Features:
479
506
 
480
- - perform searches on indexed classes to scope the search to objects of a specific class
481
- - specify multiple blueprint attributes and index methods in one statement (without specifying options)
482
- - use blocks for complex attribute or index specifications
507
+ - perform searches on indexed classes to scope the search to objects of a specific class
508
+ - specify multiple blueprint attributes and index methods in one statement (without specifying options)
509
+ - use blocks for complex attribute or index specifications
483
510
 
484
511
  Changes:
485
512
 
486
- - changed the implementation of Resultset.size to get more accurate estimations
487
- - changed the indexing of active_record or datamapper models when declared as attributes or indexes
488
- in a blueprint (indexes now all attributes of the object instead of using to_s)
513
+ - changed the implementation of Resultset.size to get more accurate estimations
514
+ - changed the indexing of active_record or datamapper models when declared as attributes or indexes
515
+ in a blueprint (indexes now all attributes of the object instead of using to_s)
489
516
 
490
- ##0.3.3 (December 13th, 2010)
517
+ ## 0.3.3 (December 13th, 2010)
491
518
 
492
519
  Features:
493
520
 
494
- - Support for multi language stop words. The implementation was inspired by John Leachs xapian-fu gem
495
- - Support for query spelling correction (similar to Google's 'did you mean...'). This feature is only
496
- available for persistent databases (due to a limitation of Xapian)
521
+ - Support for multi language stop words. The implementation was inspired by John Leachs xapian-fu gem
522
+ - Support for query spelling correction (similar to Google's 'did you mean...'). This feature is only
523
+ available for persistent databases (due to a limitation of Xapian)
497
524
 
498
525
  Changes:
499
526
 
500
- - Languages must be configured by the iso language code (:en, :de, ...). No more support for the english
501
- language names (:english, :german, ...)
502
- - Reduced the memory footprint when reindexing large tables
527
+ - Languages must be configured by the iso language code (:en, :de, ...). No more support for the english
528
+ language names (:english, :german, ...)
529
+ - Reduced the memory footprint when reindexing large tables
503
530
 
504
- ##0.3.2 (December 10th, 2010)
531
+ ## 0.3.2 (December 10th, 2010)
505
532
 
506
533
  Features:
507
534
 
508
- - Moved the per_page option from Resultset.paginate to Database.search
509
- - Added support for language settings (global and dynamic per object)
510
- - Added support for xapian stemmers
511
- - Removed the dependency to progressbar (but it is still used if available)
512
- - Made the rebuild_xapian_index method silent by default (use :verbose => true to get status info)
535
+ - Moved the per_page option from Resultset.paginate to Database.search
536
+ - Added support for language settings (global and dynamic per object)
537
+ - Added support for xapian stemmers
538
+ - Removed the dependency to progressbar (but it is still used if available)
539
+ - Made the rebuild_xapian_index method silent by default (use :verbose => true to get status info)
513
540
 
514
- ##0.3.1 (December 6th, 2010)
541
+ ## 0.3.1 (December 6th, 2010)
515
542
 
516
543
  Bugfixes:
517
544
 
518
- - Fixed the gemspec
545
+ - Fixed the gemspec
519
546
 
520
- ##0.3.0 (December 4th, 2010)
547
+ ## 0.3.0 (December 4th, 2010)
521
548
 
522
549
  Features:
523
550
 
524
- - Rails integration with configuration file (config/xapian_db.yml) and automatic setup
551
+ - Rails integration with configuration file (config/xapian_db.yml) and automatic setup
525
552
 
526
- ##0.2.0 (December 1st, 2010)
553
+ ## 0.2.0 (December 1st, 2010)
527
554
 
528
555
  Features:
529
556
 
530
- - Blueprint configuration extended
531
- - Adapter for Datamapper
532
- - Search by attribute names
533
- - Search with wildcards
534
- - Document attributes can carry anything that is serializable by YAML
557
+ - Blueprint configuration extended
558
+ - Adapter for Datamapper
559
+ - Search by attribute names
560
+ - Search with wildcards
561
+ - Document attributes can carry anything that is serializable by YAML
535
562
 
536
- ##0.1.0 (November 23th, 2010)
563
+ ## 0.1.0 (November 23th, 2010)
537
564
 
538
565
  Proof of concept, not really useful for real world usage
data/README.rdoc CHANGED
@@ -61,7 +61,7 @@ You can override these defaults by placing a config file named 'xapian_db.yml' i
61
61
 
62
62
  # XapianDb configuration
63
63
  defaults: &defaults
64
- adapter: datamapper # Avaliable adapters: :active_record, :datamapper
64
+ adapter: datamapper # Available adapters: :active_record, :datamapper
65
65
  language: de # Global language; can be overridden for specific blueprints
66
66
  term_min_length: 2 # Ignore single character terms
67
67
  enabled_query_flags: FLAG_PHRASE, FLAG_SPELLING_CORRECTION
@@ -226,7 +226,8 @@ If you want to manage the (re)indexing of your objects on your own, turn off aut
226
226
  blueprint.autoindex false
227
227
  end
228
228
 
229
- This will turn off the auto-reindexing for any object of the configured class. Use XapianDb.reindex(object) to trigger the reindexing logic in your code. Please note that destroying an object will always remove it from the xapian index.
229
+ This will turn off the auto-reindexing for any object of the configured class. Use XapianDb.reindex(object) to trigger the reindexing logic in your code.
230
+ It will also turn off the auto-deletion of the doc, when the object gets destroyed. Use XapianDb.delete_doc_with(object.xapian_id) to trigger deletion logic in your code.
230
231
 
231
232
 
232
233
  Place these configurations either into the corresponding class or - I prefer to have the index configurations outside
data/lib/type_codec.rb CHANGED
@@ -146,7 +146,7 @@ module XapianDb
146
146
  # @return [String] the encoded number
147
147
  def self.encode(number)
148
148
  case number.class.name
149
- when "Fixnum", "Float", "Bignum"
149
+ when "Fixnum", "Float", "Bignum", "Integer"
150
150
  Xapian::sortable_serialise number
151
151
  when "BigDecimal"
152
152
  Xapian::sortable_serialise number.to_f
@@ -160,7 +160,7 @@ module XapianDb
160
160
  # @return [BigDecimal] the decoded number
161
161
  def self.decode(encoded_number)
162
162
  begin
163
- BigDecimal.new(Xapian::sortable_unserialise(encoded_number).to_s)
163
+ BigDecimal(Xapian::sortable_unserialise(encoded_number).to_s)
164
164
  rescue TypeError
165
165
  raise ArgumentError.new "#{encoded_number} cannot be unserialized"
166
166
  end
@@ -175,7 +175,7 @@ module XapianDb
175
175
  def self.encode(number)
176
176
  return nil if number.nil?
177
177
  case number.class.name
178
- when "Fixnum"
178
+ when "Fixnum", "Integer"
179
179
  Xapian::sortable_serialise number
180
180
  else
181
181
  raise ArgumentError.new "#{number} was expected to be an integer"
@@ -48,19 +48,16 @@ module XapianDb
48
48
  klass.class_eval do
49
49
  # add the after commit logic, unless the blueprint has autoindexing turned off
50
50
  if XapianDb::DocumentBlueprint.blueprint_for(klass.name).autoindex?
51
- after_commit do
52
- unless self.destroyed?
53
- XapianDb.reindex(self, true, changed_attrs: self.previous_changes.keys)
54
- XapianDb::DocumentBlueprint.dependencies_for(klass.name, self.previous_changes.keys).each do |dependency|
55
- dependency.block.call(self).each{ |model| XapianDb.reindex model, true, changed_attrs: self.previous_changes.keys }
56
- end
51
+ after_commit on: [:create, :update] do
52
+ XapianDb.reindex(self, true, changed_attrs: self.previous_changes.keys)
53
+ XapianDb::DocumentBlueprint.dependencies_for(klass.name, self.previous_changes.keys).each do |dependency|
54
+ dependency.block.call(self).each{ |model| XapianDb.reindex model, true, changed_attrs: self.previous_changes.keys }
57
55
  end
58
56
  end
59
- end
60
57
 
61
- # add the after destroy logic
62
- after_destroy do
63
- XapianDb.delete_doc_with(self.xapian_id)
58
+ after_commit on: :destroy do
59
+ XapianDb.delete_doc_with(self.xapian_id)
60
+ end
64
61
  end
65
62
 
66
63
  # Add a method to reindex all models of this class
@@ -47,22 +47,22 @@ module XapianDb
47
47
  end
48
48
 
49
49
  klass.class_eval do
50
+ # add the after save/destroy logic, unless the blueprint has autoindexing turned off
51
+ if XapianDb::DocumentBlueprint.blueprint_for(klass.name).autoindex?
52
+ after :save do
53
+ blueprint = XapianDb::DocumentBlueprint.blueprint_for klass.to_s
54
+ if blueprint.should_index?(self)
55
+ XapianDb.index(self)
56
+ else
57
+ XapianDb.delete_doc_with(self.xapian_id)
58
+ end
59
+ end
50
60
 
51
- # add the after save logic
52
- after :save do
53
- blueprint = XapianDb::DocumentBlueprint.blueprint_for klass.to_s
54
- if blueprint.should_index?(self)
55
- XapianDb.index(self)
56
- else
61
+ after :destroy do
57
62
  XapianDb.delete_doc_with(self.xapian_id)
58
63
  end
59
64
  end
60
65
 
61
- # add the after destroy logic
62
- after :destroy do
63
- XapianDb.delete_doc_with(self.xapian_id)
64
- end
65
-
66
66
  # Add a method to reindex all models of this class
67
67
  define_singleton_method(:rebuild_xapian_index) do |options={}|
68
68
  options[:primary_key] = klass.serial.name
@@ -352,7 +352,7 @@ module XapianDb
352
352
  # @param [Array] args An array of arguments; you can pass a method name, an array of method names
353
353
  # or a method name and an options hash.
354
354
  # @param [Block] &block An optional block for complex configurations
355
- # Avaliable options:
355
+ # Available options:
356
356
  # - :weight (default: 1) The weight for this indexed value
357
357
  # @example Simple index declaration
358
358
  # blueprint.index :name
@@ -13,7 +13,7 @@ module XapianDb
13
13
  def index_task(options)
14
14
  klass = constantize options[:class]
15
15
  obj = klass.respond_to?(:get) ? klass.get(options[:id]) : klass.find(options[:id])
16
- DirectWriter.index obj, true, changed_attrs: options[:changed_attrs]
16
+ DirectWriter.index obj, options[:commit], changed_attrs: options[:changed_attrs]
17
17
  end
18
18
 
19
19
  def delete_doc_task(options)
@@ -19,7 +19,7 @@ module XapianDb
19
19
  # Update an object in the index
20
20
  # @param [Object] obj An instance of a class with a blueprint configuration
21
21
  def index(obj, commit=true, changed_attrs: [])
22
- beanstalk.put( { :task => "index_task", :class => obj.class.name, :id => obj.id, :changed_attrs => changed_attrs }.to_json )
22
+ beanstalk.put( { :task => "index_task", :class => obj.class.name, :id => obj.id, :changed_attrs => changed_attrs, :commit => commit }.to_json )
23
23
  end
24
24
 
25
25
  # Remove an object from the index
@@ -59,13 +59,16 @@ module XapianDb
59
59
  # Index all configured text methods
60
60
  def index_text
61
61
  term_generator = Xapian::TermGenerator.new
62
- term_generator.database = @database.writer
63
62
  term_generator.document = @xapian_doc
64
63
  if XapianDb::Config.stemmer
65
64
  term_generator.stemmer = XapianDb::Config.stemmer
66
65
  term_generator.stopper = XapianDb::Config.stopper if XapianDb::Config.stopper
67
66
  # Enable the creation of a spelling dictionary if the database is not in memory
68
- term_generator.set_flags Xapian::TermGenerator::FLAG_SPELLING if @database.is_a? XapianDb::PersistentDatabase
67
+ if @database.is_a?(XapianDb::PersistentDatabase) &&
68
+ XapianDb::Config.query_flags.include?(Xapian::QueryParser::FLAG_SPELLING_CORRECTION)
69
+ term_generator.database = @database.writer
70
+ term_generator.set_flags Xapian::TermGenerator::FLAG_SPELLING
71
+ end
69
72
  end
70
73
 
71
74
  # Index the primary key as a unique term
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xapian_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.7.1
4
+ version: 1.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gernot Kogler
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-03 00:00:00.000000000 Z
11
+ date: 2021-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - '='
144
144
  - !ruby/object:Gem::Version
145
- version: 1.2.22
145
+ version: 1.4.17
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - '='
151
151
  - !ruby/object:Gem::Version
152
- version: 1.2.22
152
+ version: 1.4.17
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: pry-rails
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -180,7 +180,7 @@ dependencies:
180
180
  version: '0'
181
181
  description: XapianDb is a ruby gem that combines features of nosql databases and
182
182
  fulltext indexing. It is based on Xapian, an efficient and powerful indexing library
183
- email: gernot.kogler (at) garaio (dot) com
183
+ email: gernot (at) kogler-informatik (dot) ch
184
184
  executables: []
185
185
  extensions: []
186
186
  extra_rdoc_files: []
@@ -235,11 +235,11 @@ files:
235
235
  - lib/xapian_db/utilities.rb
236
236
  - tasks/spec.rake
237
237
  - tasks/xapian_rebuild_index.rake
238
- homepage: https://github.com/garaio/xapian_db
238
+ homepage: https://github.com/gernotkogler/xapian_db
239
239
  licenses:
240
240
  - MIT
241
241
  metadata: {}
242
- post_install_message:
242
+ post_install_message:
243
243
  rdoc_options:
244
244
  - "--line-numbers"
245
245
  - "--inline-source"
@@ -253,16 +253,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
253
  requirements:
254
254
  - - ">="
255
255
  - !ruby/object:Gem::Version
256
- version: 2.0.0
256
+ version: 2.3.0
257
257
  required_rubygems_version: !ruby/object:Gem::Requirement
258
258
  requirements:
259
259
  - - ">="
260
260
  - !ruby/object:Gem::Version
261
261
  version: 1.3.6
262
262
  requirements: []
263
- rubyforge_project:
264
- rubygems_version: 2.4.8
265
- signing_key:
263
+ rubyforge_project:
264
+ rubygems_version: 2.7.6
265
+ signing_key:
266
266
  specification_version: 4
267
267
  summary: Ruby library to use a Xapian db as a key/value store with high performance
268
268
  fulltext search