lib/flare/session.rb in flare-1.4.3 vs lib/flare/session.rb in flare-1.4.4
- old
+ new
@@ -24,11 +24,11 @@
end
def index(*objects)
objects = ensure_searchable(objects)
objects.collect(&:to_solr_doc).each do |doc|
- connection.update(RSolr::Message::Builder.new.add(doc[:fields], doc[:attributes]))
+ connection.update(RSolr::Message::Generator.new.add(doc[:fields], doc[:attributes]))
# connection.add(doc[:fields], doc[:attributes])
end
end
def index!(*objects)
@@ -88,9 +88,10 @@
query["facet.missing"] = @params[:facet][:missing]
query["facet.mincount"] = @params[:facet][:mincount]
query["facet.prefix"] = @params[:facet][:prefix]
query["facet.offset"] = @params[:facet][:offset]
+ query["facet.offset"] = 'count'
end
if options[:mlt]
query['mlt'] = true
query['mlt.fl'] = Array(options[:mlt][:fields]).flatten.join(',')