lib/flare/session.rb in flare-1.4.0 vs lib/flare/session.rb in flare-1.4.1
- old
+ new
@@ -88,12 +88,16 @@
query["facet.missing"] = @params[:facet][:missing]
query["facet.mincount"] = @params[:facet][:mincount]
query["facet.prefix"] = @params[:facet][:prefix]
query["facet.offset"] = @params[:facet][:offset]
- end
+ end
-
+ if options[:mlt]
+ query['mlt'] = true
+ query['mlt.fl'] = Array(options[:mlt][:fields]).flatten.join(',')
+ end
+
if options[:types]
query[:fq] << Array(options[:types]).map {|type| "type:#{type}"}.join(" OR ")
end
Flare.log(<<-SOLR.squish)