duwanis/asari — pull request #4 by cvincent (2013-04-02 02:30:52+00:00)
Title: Add rank option for sortability

Just what it says in the title. The rank can be specified as either a string or an array:

```ruby
asari.search("search string", rank: "some_field")
asari.search("search string", rank: "-some_field") # Descending
asari.search("search string", rank: ["some_field", :asc])
asari.search("search string", rank: ["-some_field", :desc])
# Same semantics for ActiveRecord finder
User.asari_find("tommy", rank: ["name", :desc])
```

One extra bit, `Time`, `DateTime`, and `Date` fields are converted to integers so that they can be used for sorting.

Let me know if you'd like me to make any changes!