xapian_db 1.1.2 → 1.1.3

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.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ##1.1.3 (October 24th, 2011)
2
+
3
+ Fixes:
4
+
5
+ - weight option for attributes and indexed values was not correctly applied
6
+
1
7
  ##1.1.2 (September 10th, 2011)
2
8
 
3
9
  Fixes:
data/README.rdoc CHANGED
@@ -143,9 +143,11 @@ If you use associations in your blueprints, it might be a good idea to specify a
143
143
  blueprint.base_query Person.includes(:addresses)
144
144
  end
145
145
 
146
- place these configurations either into the corresponding class or - I prefer to have the index configurations outside
146
+ Place these configurations either into the corresponding class or - I prefer to have the index configurations outside
147
147
  the models - into the file config/xapian_blueprints.rb.
148
148
 
149
+ IMPORTANT: Do not place them into an initializer, this will not work when cache_classes is set to false (default in config/development.rb).
150
+
149
151
  === Update the index
150
152
 
151
153
  xapian_db injects some helper methods into your configured model classes that update the index automatically
@@ -81,7 +81,7 @@ module XapianDb
81
81
  # Add value with field name
82
82
  term_generator.index_text(value.to_s.downcase, options.weight, "X#{method.upcase}")
83
83
  # Add value without field name
84
- term_generator.index_text(value.to_s.downcase)
84
+ term_generator.index_text(value.to_s.downcase, options.weight)
85
85
  end
86
86
  end
87
87
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xapian_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-10 00:00:00.000000000 +02:00
12
+ date: 2011-10-24 00:00:00.000000000 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: daemons
17
- requirement: &70182803109440 !ruby/object:Gem::Requirement
17
+ requirement: &70150727729920 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 1.0.10
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70182803109440
25
+ version_requirements: *70150727729920
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: xapian-ruby
28
- requirement: &70182803108960 !ruby/object:Gem::Requirement
28
+ requirement: &70150727729460 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 1.2.6
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70182803108960
36
+ version_requirements: *70150727729460
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rspec
39
- requirement: &70182803108480 !ruby/object:Gem::Requirement
39
+ requirement: &70150727729000 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 2.3.1
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *70182803108480
47
+ version_requirements: *70150727729000
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: simplecov
50
- requirement: &70182803108020 !ruby/object:Gem::Requirement
50
+ requirement: &70150727728540 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 0.3.7
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *70182803108020
58
+ version_requirements: *70150727728540
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: beanstalk-client
61
- requirement: &70182803107560 !ruby/object:Gem::Requirement
61
+ requirement: &70150727728080 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: 1.1.0
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *70182803107560
69
+ version_requirements: *70150727728080
70
70
  description: XapianDb is a ruby gem that combines features of nosql databases and
71
71
  fulltext indexing. It is based on Xapian, an efficient and powerful indexing library
72
72
  email: gernot.kogler (at) garaio (dot) com
@@ -112,7 +112,6 @@ files:
112
112
  - lib/xapian_db/stopwords/update_stopwords.rb
113
113
  - lib/xapian_db/utilities.rb
114
114
  - lib/xapian_db.rb
115
- - tasks/beanstalk_worker.rake
116
115
  - LICENSE
117
116
  - README.rdoc
118
117
  - CHANGELOG.md
@@ -144,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
143
  version: 1.3.6
145
144
  requirements: []
146
145
  rubyforge_project:
147
- rubygems_version: 1.3.9.2
146
+ rubygems_version: 1.3.9.3
148
147
  signing_key:
149
148
  specification_version: 3
150
149
  summary: Ruby library to use a Xapian db as a key/value store with high performance
@@ -1,37 +0,0 @@
1
- # encoding: utf-8
2
-
3
- # This rake task is built to run within a Rails application and is the
4
- # backend worker to serialize the index updates to a xapian database.
5
- # Remember to install beanstalkd and configure the beanstalk-client gem
6
- # in your Gemfile
7
-
8
- require "#{Rails.root}/config/environment"
9
- require "xapian_db"
10
- require 'yaml'
11
-
12
- namespace :xapian_db do
13
-
14
- DEPRECATION_WARNING = "beanstalk_worker.rake is deprecated, use script/beanstalk_worker instead"
15
- desc DEPRECATION_WARNING
16
- task :beanstalk_worker do
17
-
18
- url = XapianDb::Config.beanstalk_daemon_url
19
- beanstalk = Beanstalk::Pool.new([url])
20
- worker = XapianDb::IndexWriters::BeanstalkWorker.new
21
- puts DEPRECATION_WARNING
22
- puts "XapianDb beanstalk worker is serving on #{url}..."
23
- loop do
24
- job = beanstalk.reserve
25
- begin
26
- params = YAML::load job.body
27
- Rails.logger.info "XapianDb beanstalk worker: executing task #{params}"
28
- task = params.delete :task
29
- worker.send task, params
30
- rescue Exception => ex
31
- Rails.logger.error "XapianDb beanstalk worker: could not process #{job.body} (#{ex})"
32
- end
33
- job.delete
34
- end
35
-
36
- end
37
- end