mwmitchell-rsolr-ext 0.7.9 → 0.7.10
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/lib/rsolr-ext.rb +1 -1
- data/lib/rsolr-ext/doc.rb +5 -1
- data/rsolr-ext.gemspec +1 -1
- metadata +1 -1
data/lib/rsolr-ext.rb
CHANGED
data/lib/rsolr-ext/doc.rb
CHANGED
@@ -49,11 +49,15 @@ module RSolr::Ext::Doc
|
|
49
49
|
|
50
50
|
def default_params
|
51
51
|
@default_params ||= {:qt=>:standard, :rows=>10}
|
52
|
+
# don't allow nil values to pass!
|
53
|
+
@default_params.delete_if {|k,v| v.to_s.empty?}
|
54
|
+
@default_params
|
52
55
|
end
|
53
56
|
|
54
57
|
def find(*args)
|
55
58
|
mode, solr_params, opts = connection.send(:extract_find_opts!, *args)
|
56
|
-
|
59
|
+
final_params = default_params.merge(solr_params)
|
60
|
+
connection.find(*[mode, final_params, opts]) { |doc| self.new(doc) }
|
57
61
|
end
|
58
62
|
|
59
63
|
def find_by_id(id, solr_params={}, opts={})
|
data/rsolr-ext.gemspec
CHANGED