elasticsearch/elasticsearch-rails — pull request #102 by dwkoogt (2014-05-05 16:46:50+00:00)
Title: broken tests for using each_with_hit and search result order

broken tests for using each_with_hit when the returned records should not be the natural order.

this is for issue #99

searching for 'code' returns 'Coding' first and 'Test Coding' second from elasticsearch.
it compares ids of db records to response result.

note: calling to_a within the each_with_hit method changes the _id behavior on the mongoid record. it returned string id originally but after to_a is called, it returns ObjectId instead.