Searching and sorting by a float field with thinking sphinx
- by nathan Verni
I'm using thinking sphinx to for search on a rails app. I have a float field called 'height'. I need to be able to search this field for exact values (i.e. exactly 6.0, not 6.5). I also need to be able to sort on the field.
What I have so far:
indexes height, :sortable => true
Problem:
doesn't sort properly, returns 6.0 and 6.5 if I search for '6'