#85 ✓resolved

order_by(:distance) should fail fast

Reported by mat | March 8th, 2010 @ 09:24 AM | in Bugs

In pre-1.0 versions of Sunspot, geographical distance ordering was done using:


However, in Sunspot 1.0, the correct way to do this is:

near(coords, :sort => true)

Sunspot 1.0 should fail fast if :distance is passed into the order_by method (unless, of course, there is an actual distance field indexed).

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Awesome Solr interaction for Ruby

People watching this ticket

Referenced by