xapian-fu 1.3 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ === 1.3.1 (12th October 2011)
2
+
3
+ * Fix casting of values on search. (Damian Janowski)
4
+
1
5
  === 1.3 (7th July 2011)
2
6
 
3
7
  * Support for phrase searching
@@ -18,7 +18,8 @@ module XapianFu
18
18
  @current_page = options[:current_page]
19
19
  @per_page = options[:per_page]
20
20
  @corrected_query = options[:corrected_query]
21
- concat mset.matches.collect { |m| XapianDoc.new(m) }
21
+ doc_options = {:xapian_db => options[:xapian_db] }
22
+ concat mset.matches.collect { |m| XapianDoc.new(m, doc_options) }
22
23
  end
23
24
 
24
25
  # The estimated total number of matches this search could return
@@ -234,7 +234,7 @@ module XapianFu #:nodoc:
234
234
  end
235
235
  enquiry.query = query
236
236
  ResultSet.new(:mset => enquiry.mset(offset, per_page), :current_page => page + 1,
237
- :per_page => per_page, :corrected_query => qp.corrected_query)
237
+ :per_page => per_page, :corrected_query => qp.corrected_query, :xapian_db => self)
238
238
  end
239
239
 
240
240
  # Run the given block in a XapianDB transaction. Any changes to the
@@ -123,6 +123,8 @@ describe XapianDocValueAccessor do
123
123
  doc.values[field].should === FILM_DATA[i][field]
124
124
  end
125
125
  end
126
+
127
+ db.search("cold mountain")[0].values[:revenue].should == 173_013_509
126
128
  end
127
129
  end
128
130
 
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xapian-fu
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- version: "1.3"
9
+ - 1
10
+ version: 1.3.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - John Leach
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-07-07 00:00:00 Z
18
+ date: 2011-10-12 00:00:00 Z
18
19
  dependencies:
19
20
  - !ruby/object:Gem::Dependency
20
21
  name: rspec
@@ -166,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
167
  requirements: []
167
168
 
168
169
  rubyforge_project: xapian-fu
169
- rubygems_version: 1.7.2
170
+ rubygems_version: 1.8.10
170
171
  signing_key:
171
172
  specification_version: 3
172
173
  summary: A Ruby interface to the Xapian search engine
@@ -230,4 +231,3 @@ test_files:
230
231
  - spec/build_db_for_value_testing.rb
231
232
  - spec/query_parser_spec.rb
232
233
  - spec/spec.opts
233
- has_rdoc: