Acts_as_ferret multi_search different results dev and prod

When I do a multi_search query in my dev environment the FerretResult
that is returned has an @data hash attribute, and this hash contains the
element :class_name (store_classname => true is set for all of the
models I use in the multi_search). This is convenient because I can then
use the @data methodmissing feature of the FerretResult to do a
comparison of the result class. I also store the field data in the index
for a fast auto_complete UI.

Here’s some sample code to Illustrate:

results = Shelter.multi_search(query, [Animal], :lazy => [:size, :type]
results.each do |result|
if result.class_name == “Shelter”
value = result.size
elsif result.class_name == “Animal”
value = result.type
end
end

This works fine in development. But in my production environment using a
DRb server in the results I get back, the @data hash does not contain a
:class_name element.

I guess I could restructure my code so that I could see which lazy field
is not nil and grab that.

But I’m curious as to why I’m seeing a difference in what is returned in
the @data hash between development and production.