mongoid-xapian 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/mongoid-xapian.rb +3 -2
- data/mongoid-xapian.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/lib/mongoid-xapian.rb
CHANGED
@@ -91,8 +91,9 @@ module MongoidXapian
|
|
91
91
|
"#{Bundler.root}/xapian/#{self.to_s.underscore}.#{language}.db"
|
92
92
|
end
|
93
93
|
|
94
|
-
def search(pattern,
|
95
|
-
|
94
|
+
def search(pattern, opts = {})
|
95
|
+
language = opts.delete(:language) || 'en'
|
96
|
+
ids = search_db(language).search(pattern, opts).map do |result|
|
96
97
|
result.values[:_id]
|
97
98
|
end
|
98
99
|
|
data/mongoid-xapian.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-xapian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -211,7 +211,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
211
211
|
version: '0'
|
212
212
|
segments:
|
213
213
|
- 0
|
214
|
-
hash:
|
214
|
+
hash: 4374857612297856311
|
215
215
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
216
216
|
none: false
|
217
217
|
requirements:
|